├── ios ├── Flutter │ ├── Debug.xcconfig │ ├── Release.xcconfig │ └── AppFrameworkInfo.plist ├── Runner │ ├── Runner-Bridging-Header.h │ ├── .DS_Store │ ├── Assets.xcassets │ │ ├── LaunchImage.imageset │ │ │ ├── LaunchImage.png │ │ │ ├── LaunchImage@2x.png │ │ │ ├── LaunchImage@3x.png │ │ │ ├── README.md │ │ │ └── Contents.json │ │ └── AppIcon.appiconset │ │ │ ├── Icon-App-20x20@1x.png │ │ │ ├── Icon-App-20x20@2x.png │ │ │ ├── Icon-App-20x20@3x.png │ │ │ ├── Icon-App-29x29@1x.png │ │ │ ├── Icon-App-29x29@2x.png │ │ │ ├── Icon-App-29x29@3x.png │ │ │ ├── Icon-App-40x40@1x.png │ │ │ ├── Icon-App-40x40@2x.png │ │ │ ├── Icon-App-40x40@3x.png │ │ │ ├── Icon-App-60x60@2x.png │ │ │ ├── Icon-App-60x60@3x.png │ │ │ ├── Icon-App-76x76@1x.png │ │ │ ├── Icon-App-76x76@2x.png │ │ │ ├── Icon-App-1024x1024@1x.png │ │ │ ├── Icon-App-83.5x83.5@2x.png │ │ │ └── Contents.json │ ├── AppDelegate.swift │ ├── Base.lproj │ │ ├── Main.storyboard │ │ └── LaunchScreen.storyboard │ └── Info.plist ├── .DS_Store ├── Runner.xcodeproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── WorkspaceSettings.xcsettings │ │ │ └── IDEWorkspaceChecks.plist │ ├── xcshareddata │ │ └── xcschemes │ │ │ └── Runner.xcscheme │ └── project.pbxproj ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── WorkspaceSettings.xcsettings │ │ └── IDEWorkspaceChecks.plist └── .gitignore ├── .DS_Store ├── assets ├── pin.png ├── .DS_Store ├── alarm.png ├── clear.png ├── hail.png ├── sleet.png ├── snow.png ├── checked.png ├── humidity.png ├── max-temp.png ├── menu-bar.png ├── profile.png ├── showers.png ├── get-started.png ├── heavycloud.png ├── heavyrain.png ├── lightcloud.png ├── lightrain.png ├── unchecked.png ├── windspeed.png └── thunderstorm.png ├── lib ├── .DS_Store ├── models │ ├── constants.dart │ └── city.dart ├── main.dart ├── widgets │ └── weather_item.dart └── ui │ ├── get_started.dart │ ├── welcome.dart │ ├── home.dart │ └── detail_page.dart ├── android ├── .DS_Store ├── gradle.properties ├── app │ ├── src │ │ ├── main │ │ │ ├── res │ │ │ │ ├── mipmap-hdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-mdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── mipmap-xxxhdpi │ │ │ │ │ └── ic_launcher.png │ │ │ │ ├── drawable │ │ │ │ │ └── launch_background.xml │ │ │ │ ├── drawable-v21 │ │ │ │ │ └── launch_background.xml │ │ │ │ ├── values │ │ │ │ │ └── styles.xml │ │ │ │ └── values-night │ │ │ │ │ └── styles.xml │ │ │ ├── kotlin │ │ │ │ └── com │ │ │ │ │ └── example │ │ │ │ │ └── weather │ │ │ │ │ └── MainActivity.kt │ │ │ └── AndroidManifest.xml │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ └── profile │ │ │ └── AndroidManifest.xml │ └── build.gradle ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties ├── .gitignore ├── settings.gradle ├── build.gradle └── weather_android.iml ├── README.md ├── weather.iml ├── test └── widget_test.dart ├── analysis_options.yaml ├── pubspec.yaml └── pubspec.lock /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/realflutternuggets/flutter-weather-app/HEAD/.DS_Store -------------------------------------------------------------------------------- /assets/pin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/realflutternuggets/flutter-weather-app/HEAD/assets/pin.png -------------------------------------------------------------------------------- /ios/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/realflutternuggets/flutter-weather-app/HEAD/ios/.DS_Store -------------------------------------------------------------------------------- /lib/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/realflutternuggets/flutter-weather-app/HEAD/lib/.DS_Store -------------------------------------------------------------------------------- /android/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/realflutternuggets/flutter-weather-app/HEAD/android/.DS_Store -------------------------------------------------------------------------------- /assets/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/realflutternuggets/flutter-weather-app/HEAD/assets/.DS_Store -------------------------------------------------------------------------------- /assets/alarm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/realflutternuggets/flutter-weather-app/HEAD/assets/alarm.png -------------------------------------------------------------------------------- /assets/clear.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/realflutternuggets/flutter-weather-app/HEAD/assets/clear.png -------------------------------------------------------------------------------- /assets/hail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/realflutternuggets/flutter-weather-app/HEAD/assets/hail.png -------------------------------------------------------------------------------- /assets/sleet.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/realflutternuggets/flutter-weather-app/HEAD/assets/sleet.png -------------------------------------------------------------------------------- /assets/snow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/realflutternuggets/flutter-weather-app/HEAD/assets/snow.png -------------------------------------------------------------------------------- /assets/checked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/realflutternuggets/flutter-weather-app/HEAD/assets/checked.png -------------------------------------------------------------------------------- /assets/humidity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/realflutternuggets/flutter-weather-app/HEAD/assets/humidity.png -------------------------------------------------------------------------------- /assets/max-temp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/realflutternuggets/flutter-weather-app/HEAD/assets/max-temp.png -------------------------------------------------------------------------------- /assets/menu-bar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/realflutternuggets/flutter-weather-app/HEAD/assets/menu-bar.png -------------------------------------------------------------------------------- /assets/profile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/realflutternuggets/flutter-weather-app/HEAD/assets/profile.png -------------------------------------------------------------------------------- /assets/showers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/realflutternuggets/flutter-weather-app/HEAD/assets/showers.png -------------------------------------------------------------------------------- /assets/get-started.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/realflutternuggets/flutter-weather-app/HEAD/assets/get-started.png -------------------------------------------------------------------------------- /assets/heavycloud.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/realflutternuggets/flutter-weather-app/HEAD/assets/heavycloud.png -------------------------------------------------------------------------------- /assets/heavyrain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/realflutternuggets/flutter-weather-app/HEAD/assets/heavyrain.png -------------------------------------------------------------------------------- /assets/lightcloud.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/realflutternuggets/flutter-weather-app/HEAD/assets/lightcloud.png -------------------------------------------------------------------------------- /assets/lightrain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/realflutternuggets/flutter-weather-app/HEAD/assets/lightrain.png -------------------------------------------------------------------------------- /assets/unchecked.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/realflutternuggets/flutter-weather-app/HEAD/assets/unchecked.png -------------------------------------------------------------------------------- /assets/windspeed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/realflutternuggets/flutter-weather-app/HEAD/assets/windspeed.png -------------------------------------------------------------------------------- /ios/Runner/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/realflutternuggets/flutter-weather-app/HEAD/ios/Runner/.DS_Store -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /assets/thunderstorm.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/realflutternuggets/flutter-weather-app/HEAD/assets/thunderstorm.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/realflutternuggets/flutter-weather-app/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/realflutternuggets/flutter-weather-app/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/realflutternuggets/flutter-weather-app/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/realflutternuggets/flutter-weather-app/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/realflutternuggets/flutter-weather-app/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/realflutternuggets/flutter-weather-app/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/realflutternuggets/flutter-weather-app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/realflutternuggets/flutter-weather-app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/realflutternuggets/flutter-weather-app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/realflutternuggets/flutter-weather-app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/realflutternuggets/flutter-weather-app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/realflutternuggets/flutter-weather-app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/realflutternuggets/flutter-weather-app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/realflutternuggets/flutter-weather-app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/realflutternuggets/flutter-weather-app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/realflutternuggets/flutter-weather-app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/realflutternuggets/flutter-weather-app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/realflutternuggets/flutter-weather-app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/realflutternuggets/flutter-weather-app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/realflutternuggets/flutter-weather-app/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/realflutternuggets/flutter-weather-app/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /android/app/src/main/kotlin/com/example/weather/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.example.weather 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/realflutternuggets/flutter-weather-app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/realflutternuggets/flutter-weather-app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # weather app 2 | 3 | A new Flutter project which fetches and displays data from any city in the World using a free weather API with no key required. 4 | 5 | View on YouTube 6 | https://youtu.be/DWZPu0kW2Nk 7 | -------------------------------------------------------------------------------- /lib/models/constants.dart: -------------------------------------------------------------------------------- 1 | 2 | import 'package:flutter/material.dart'; 3 | 4 | class Constants{ 5 | final Color primaryColor = const Color(0xff90B2F9); 6 | final Color secondaryColor = const Color(0xff90B2F8); 7 | } -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Jun 23 08:50:38 CEST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-all.zip 7 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | 9 | # Remember to never publicly share your keystore. 10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app 11 | key.properties 12 | **/*.keystore 13 | **/*.jks 14 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | 4 | @UIApplicationMain 5 | @objc class AppDelegate: FlutterAppDelegate { 6 | override func application( 7 | _ application: UIApplication, 8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? 9 | ) -> Bool { 10 | GeneratedPluginRegistrant.register(with: self) 11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'ui/get_started.dart'; 4 | 5 | void main(){ 6 | runApp(const MyApp()); 7 | } 8 | 9 | class MyApp extends StatelessWidget { 10 | const MyApp({Key? key}) : super(key: key); 11 | 12 | @override 13 | Widget build(BuildContext context) { 14 | return const MaterialApp( 15 | title: 'Weather App', 16 | home: GetStarted(), 17 | debugShowCheckedModeBanner: false, 18 | ); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties") 4 | def properties = new Properties() 5 | 6 | assert localPropertiesFile.exists() 7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } 8 | 9 | def flutterSdkPath = properties.getProperty("flutter.sdk") 10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" 12 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /weather.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /ios/.gitignore: -------------------------------------------------------------------------------- 1 | **/dgph 2 | *.mode1v3 3 | *.mode2v3 4 | *.moved-aside 5 | *.pbxuser 6 | *.perspectivev3 7 | **/*sync/ 8 | .sconsign.dblite 9 | .tags* 10 | **/.vagrant/ 11 | **/DerivedData/ 12 | Icon? 13 | **/Pods/ 14 | **/.symlinks/ 15 | profile 16 | xcuserdata 17 | **/.generated/ 18 | Flutter/App.framework 19 | Flutter/Flutter.framework 20 | Flutter/Flutter.podspec 21 | Flutter/Generated.xcconfig 22 | Flutter/ephemeral/ 23 | Flutter/app.flx 24 | Flutter/app.zip 25 | Flutter/flutter_assets/ 26 | Flutter/flutter_export_environment.sh 27 | ServiceDefinitions.json 28 | Runner/GeneratedPluginRegistrant.* 29 | 30 | # Exceptions to above rules. 31 | !default.mode1v3 32 | !default.mode2v3 33 | !default.pbxuser 34 | !default.perspectivev3 35 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.6.10' 3 | repositories { 4 | google() 5 | mavenCentral() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:4.1.0' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | } 12 | } 13 | 14 | allprojects { 15 | repositories { 16 | google() 17 | mavenCentral() 18 | } 19 | } 20 | 21 | rootProject.buildDir = '../build' 22 | subprojects { 23 | project.buildDir = "${rootProject.buildDir}/${project.name}" 24 | } 25 | subprojects { 26 | project.evaluationDependsOn(':app') 27 | } 28 | 29 | task clean(type: Delete) { 30 | delete rootProject.buildDir 31 | } 32 | -------------------------------------------------------------------------------- /ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 9.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /test/widget_test.dart: -------------------------------------------------------------------------------- 1 | // This is a basic Flutter widget test. 2 | // 3 | // To perform an interaction with a widget in your test, use the WidgetTester 4 | // utility that Flutter provides. For example, you can send tap and scroll 5 | // gestures. You can also use WidgetTester to find child widgets in the widget 6 | // tree, read text, and verify that the values of widget properties are correct. 7 | 8 | import 'package:flutter/material.dart'; 9 | import 'package:flutter_test/flutter_test.dart'; 10 | 11 | import 'package:weather/main.dart'; 12 | 13 | void main() { 14 | testWidgets('Counter increments smoke test', (WidgetTester tester) async { 15 | // Build our app and trigger a frame. 16 | await tester.pumpWidget(const MyApp()); 17 | 18 | // Verify that our counter starts at 0. 19 | expect(find.text('0'), findsOneWidget); 20 | expect(find.text('1'), findsNothing); 21 | 22 | // Tap the '+' icon and trigger a frame. 23 | await tester.tap(find.byIcon(Icons.add)); 24 | await tester.pump(); 25 | 26 | // Verify that our counter has incremented. 27 | expect(find.text('0'), findsNothing); 28 | expect(find.text('1'), findsOneWidget); 29 | }); 30 | } 31 | -------------------------------------------------------------------------------- /lib/widgets/weather_item.dart: -------------------------------------------------------------------------------- 1 | 2 | import 'package:flutter/material.dart'; 3 | 4 | class weatherItem extends StatelessWidget { 5 | const weatherItem({ 6 | Key? key, 7 | required this.value, required this.text, required this.unit, required this.imageUrl, 8 | }) : super(key: key); 9 | 10 | final int value; 11 | final String text; 12 | final String unit; 13 | final String imageUrl; 14 | 15 | @override 16 | Widget build(BuildContext context) { 17 | return Column( 18 | children: [ 19 | Text(text, style: const TextStyle( 20 | color: Colors.black54, 21 | ),), 22 | const SizedBox( 23 | height: 8, 24 | ), 25 | Container( 26 | padding: const EdgeInsets.all(10.0), 27 | height: 60, 28 | width: 60, 29 | decoration: const BoxDecoration( 30 | color: Color(0xffE0E8FB), 31 | borderRadius: BorderRadius.all(Radius.circular(15)), 32 | ), 33 | child: Image.asset(imageUrl), 34 | ), 35 | const SizedBox( 36 | height: 8, 37 | ), 38 | Text(value.toString() + unit, style: const TextStyle( 39 | fontWeight: FontWeight.bold, 40 | ),) 41 | ], 42 | ); 43 | } 44 | } -------------------------------------------------------------------------------- /analysis_options.yaml: -------------------------------------------------------------------------------- 1 | # This file configures the analyzer, which statically analyzes Dart code to 2 | # check for errors, warnings, and lints. 3 | # 4 | # The issues identified by the analyzer are surfaced in the UI of Dart-enabled 5 | # IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be 6 | # invoked from the command line by running `flutter analyze`. 7 | 8 | # The following line activates a set of recommended lints for Flutter apps, 9 | # packages, and plugins designed to encourage good coding practices. 10 | include: package:flutter_lints/flutter.yaml 11 | 12 | linter: 13 | # The lint rules applied to this project can be customized in the 14 | # section below to disable rules from the `package:flutter_lints/flutter.yaml` 15 | # included above or to enable additional rules. A list of all available lints 16 | # and their documentation is published at 17 | # https://dart-lang.github.io/linter/lints/index.html. 18 | # 19 | # Instead of disabling a lint rule for the entire project in the 20 | # section below, it can also be suppressed for a single line of code 21 | # or a specific dart file by using the `// ignore: name_of_lint` and 22 | # `// ignore_for_file: name_of_lint` syntax on the line or in the file 23 | # producing the lint. 24 | rules: 25 | # avoid_print: false # Uncomment to disable the `avoid_print` rule 26 | # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule 27 | 28 | # Additional information about this file can be found at 29 | # https://dart.dev/guides/language/analysis-options 30 | -------------------------------------------------------------------------------- /android/weather_android.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /lib/ui/get_started.dart: -------------------------------------------------------------------------------- 1 | 2 | import 'package:flutter/material.dart'; 3 | import 'package:weather/models/constants.dart'; 4 | import 'package:weather/ui/welcome.dart'; 5 | 6 | class GetStarted extends StatelessWidget { 7 | const GetStarted({Key? key}) : super(key: key); 8 | 9 | @override 10 | Widget build(BuildContext context) { 11 | Constants myConstants = Constants(); 12 | 13 | Size size = MediaQuery.of(context).size; 14 | 15 | return Scaffold( 16 | body: Container( 17 | width: size.width, 18 | height: size.height, 19 | color: myConstants.primaryColor.withOpacity(.5), 20 | child: Center( 21 | child: Column( 22 | mainAxisAlignment: MainAxisAlignment.center, 23 | crossAxisAlignment: CrossAxisAlignment.center, 24 | 25 | children: [ 26 | Image.asset('assets/get-started.png'), 27 | const SizedBox(height: 30,), 28 | GestureDetector( 29 | onTap: (){ 30 | Navigator.pushReplacement(context, MaterialPageRoute(builder: (context)=> const Welcome())); 31 | }, 32 | child: Container( 33 | height: 50, 34 | width: size.width * 0.7, 35 | decoration: BoxDecoration( 36 | color: myConstants.primaryColor, 37 | borderRadius: const BorderRadius.all(Radius.circular(10)), 38 | ), 39 | child: const Center( 40 | child: Text('Get started', style: TextStyle(color: Colors.white, fontSize: 18),), 41 | ), 42 | ), 43 | ), 44 | ], 45 | ), 46 | ), 47 | ), 48 | ); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleDisplayName 8 | Weather 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | weather 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(FLUTTER_BUILD_NAME) 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | $(FLUTTER_BUILD_NUMBER) 25 | LSRequiresIPhoneOS 26 | 27 | UILaunchStoryboardName 28 | LaunchScreen 29 | UIMainStoryboardFile 30 | Main 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | UIViewControllerBasedStatusBarAppearance 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 7 | 15 | 19 | 23 | 24 | 25 | 26 | 27 | 28 | 30 | 33 | 34 | 35 | -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | def localProperties = new Properties() 2 | def localPropertiesFile = rootProject.file('local.properties') 3 | if (localPropertiesFile.exists()) { 4 | localPropertiesFile.withReader('UTF-8') { reader -> 5 | localProperties.load(reader) 6 | } 7 | } 8 | 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') 10 | if (flutterRoot == null) { 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 12 | } 13 | 14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 15 | if (flutterVersionCode == null) { 16 | flutterVersionCode = '1' 17 | } 18 | 19 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 20 | if (flutterVersionName == null) { 21 | flutterVersionName = '1.0' 22 | } 23 | 24 | apply plugin: 'com.android.application' 25 | apply plugin: 'kotlin-android' 26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 27 | 28 | android { 29 | compileSdkVersion flutter.compileSdkVersion 30 | 31 | compileOptions { 32 | sourceCompatibility JavaVersion.VERSION_1_8 33 | targetCompatibility JavaVersion.VERSION_1_8 34 | } 35 | 36 | kotlinOptions { 37 | jvmTarget = '1.8' 38 | } 39 | 40 | sourceSets { 41 | main.java.srcDirs += 'src/main/kotlin' 42 | } 43 | 44 | defaultConfig { 45 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 46 | applicationId "com.example.weather" 47 | minSdkVersion flutter.minSdkVersion 48 | targetSdkVersion flutter.targetSdkVersion 49 | versionCode flutterVersionCode.toInteger() 50 | versionName flutterVersionName 51 | } 52 | 53 | buildTypes { 54 | release { 55 | // TODO: Add your own signing config for the release build. 56 | // Signing with the debug keys for now, so `flutter run --release` works. 57 | signingConfig signingConfigs.debug 58 | } 59 | } 60 | } 61 | 62 | flutter { 63 | source '../..' 64 | } 65 | 66 | dependencies { 67 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 68 | } 69 | -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /lib/models/city.dart: -------------------------------------------------------------------------------- 1 | class City{ 2 | bool isSelected; 3 | final String city; 4 | final String country; 5 | final bool isDefault; 6 | 7 | City({required this.isSelected, required this.city, required this.country, required this.isDefault}); 8 | 9 | //List of Cities data 10 | static List citiesList = [ 11 | City( 12 | isSelected: false, 13 | city: 'London', 14 | country: 'United Kindgom', 15 | isDefault: true), 16 | City( 17 | isSelected: false, 18 | city: 'Tokyo', 19 | country: 'Japan', 20 | isDefault: false), 21 | City( 22 | isSelected: false, 23 | city: 'Delhi', 24 | country: 'India', 25 | isDefault: false), 26 | City( 27 | isSelected: false, 28 | city: 'Beijing', 29 | country: 'China', 30 | isDefault: false), 31 | City( 32 | isSelected: false, 33 | city: 'Paris', 34 | country: 'Paris', 35 | isDefault: false), 36 | City( 37 | isSelected: false, 38 | city: 'Rome', 39 | country: 'Italy', 40 | isDefault: false), 41 | City( 42 | isSelected: false, 43 | city: 'Lagos', 44 | country: 'Nigeria', 45 | isDefault: false), 46 | City( 47 | isSelected: false, 48 | city: 'Amsterdam', 49 | country: 'Netherlands', 50 | isDefault: false), 51 | City( 52 | isSelected: false, 53 | city: 'Barcelona', 54 | country: 'Spain', 55 | isDefault: false), 56 | City( 57 | isSelected: false, 58 | city: 'Miami', 59 | country: 'United States', 60 | isDefault: false), 61 | City( 62 | isSelected: false, 63 | city: 'Vienna', 64 | country: 'Austria', 65 | isDefault: false), 66 | City( 67 | isSelected: false, 68 | city: 'Berlin', 69 | country: 'Germany', 70 | isDefault: false), 71 | City( 72 | isSelected: false, 73 | city: 'Toronto', 74 | country: 'Canada', 75 | isDefault: false), 76 | City( 77 | isSelected: false, 78 | city: 'Brussels', 79 | country: 'Belgium', 80 | isDefault: false), 81 | City( 82 | isSelected: false, 83 | city: 'Nairobi', 84 | country: 'Kenya', 85 | isDefault: false), 86 | ]; 87 | 88 | //Get the selected cities 89 | static List getSelectedCities(){ 90 | List selectedCities = City.citiesList; 91 | return selectedCities 92 | .where((city) => city.isSelected == true) 93 | .toList(); 94 | } 95 | } 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-App-20x20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-App-20x20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-App-29x29@1x.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-App-29x29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-App-29x29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-App-40x40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-App-40x40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-App-60x60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "Icon-App-60x60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "Icon-App-20x20@1x.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "Icon-App-20x20@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-App-29x29@1x.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-App-29x29@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-App-40x40@1x.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-App-40x40@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-App-76x76@1x.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-App-76x76@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "Icon-App-83.5x83.5@2x.png", 109 | "scale" : "2x" 110 | }, 111 | { 112 | "size" : "1024x1024", 113 | "idiom" : "ios-marketing", 114 | "filename" : "Icon-App-1024x1024@1x.png", 115 | "scale" : "1x" 116 | } 117 | ], 118 | "info" : { 119 | "version" : 1, 120 | "author" : "xcode" 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /lib/ui/welcome.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:weather/models/city.dart'; 3 | import 'package:weather/models/constants.dart'; 4 | import 'package:weather/ui/home.dart'; 5 | 6 | class Welcome extends StatefulWidget { 7 | const Welcome({Key? key}) : super(key: key); 8 | 9 | @override 10 | State createState() => _WelcomeState(); 11 | } 12 | 13 | class _WelcomeState extends State { 14 | @override 15 | Widget build(BuildContext context) { 16 | List cities = City.citiesList.where((city) => city.isDefault == false).toList(); 17 | List selectedCities = City.getSelectedCities(); 18 | 19 | Constants myConstants = Constants(); 20 | Size size = MediaQuery.of(context).size; 21 | 22 | return Scaffold( 23 | appBar: AppBar( 24 | automaticallyImplyLeading: false, 25 | backgroundColor: myConstants.secondaryColor, 26 | title: Text(selectedCities.length.toString() + ' selected'), 27 | ), 28 | body: ListView.builder( 29 | physics: const BouncingScrollPhysics(), 30 | itemCount: cities.length, 31 | itemBuilder: (BuildContext context, int index){ 32 | return Container( 33 | margin: const EdgeInsets.only(left: 10, top: 20, right: 10), 34 | padding: const EdgeInsets.symmetric(horizontal: 20), 35 | height: size.height * .08, 36 | width: size.width, 37 | decoration: BoxDecoration( 38 | border: cities[index].isSelected == true ? Border.all( 39 | color: myConstants.secondaryColor.withOpacity(.6), 40 | width: 2, 41 | ) : Border.all(color: Colors.white), 42 | borderRadius: const BorderRadius.all(Radius.circular(10)), 43 | boxShadow: [ 44 | BoxShadow( 45 | color: myConstants.primaryColor.withOpacity(.2), 46 | spreadRadius: 5, 47 | blurRadius: 7, 48 | offset: const Offset(0, 3), 49 | ) 50 | ] 51 | ), 52 | child: Row( 53 | children: [ 54 | GestureDetector( 55 | onTap: (){ 56 | setState(() { 57 | cities[index].isSelected =! cities[index].isSelected; 58 | }); 59 | }, 60 | child: Image.asset(cities[index].isSelected == true ? 'assets/checked.png' : 'assets/unchecked.png', width: 30,)), 61 | const SizedBox( width: 10,), 62 | Text(cities[index].city, style: TextStyle( 63 | fontSize: 16, 64 | color: cities[index].isSelected == true ? myConstants.primaryColor : Colors.black54, 65 | ),) 66 | ], 67 | ), 68 | ); 69 | }, 70 | ), 71 | floatingActionButton: FloatingActionButton( 72 | backgroundColor: myConstants.secondaryColor, 73 | child: const Icon(Icons.pin_drop), 74 | onPressed: (){ 75 | Navigator.pushReplacement(context, MaterialPageRoute(builder: (context) => const Home())); 76 | }, 77 | ), 78 | ); 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 37 | 38 | 39 | 40 | 41 | 42 | 52 | 54 | 60 | 61 | 62 | 63 | 69 | 71 | 77 | 78 | 79 | 80 | 82 | 83 | 86 | 87 | 88 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: weather 2 | description: A new Flutter project. 3 | 4 | # The following line prevents the package from being accidentally published to 5 | # pub.dev using `flutter pub publish`. This is preferred for private packages. 6 | publish_to: 'none' # Remove this line if you wish to publish to pub.dev 7 | 8 | # The following defines the version and build number for your application. 9 | # A version number is three numbers separated by dots, like 1.2.43 10 | # followed by an optional build number separated by a +. 11 | # Both the version and the builder number may be overridden in flutter 12 | # build by specifying --build-name and --build-number, respectively. 13 | # In Android, build-name is used as versionName while build-number used as versionCode. 14 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning 15 | # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. 16 | # Read more about iOS versioning at 17 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html 18 | version: 1.0.0+1 19 | 20 | environment: 21 | sdk: ">=2.16.1 <3.0.0" 22 | 23 | # Dependencies specify other packages that your package needs in order to work. 24 | # To automatically upgrade your package dependencies to the latest versions 25 | # consider running `flutter pub upgrade --major-versions`. Alternatively, 26 | # dependencies can be manually updated by changing the version numbers below to 27 | # the latest version available on pub.dev. To see which dependencies have newer 28 | # versions available, run `flutter pub outdated`. 29 | dependencies: 30 | flutter: 31 | sdk: flutter 32 | 33 | 34 | # The following adds the Cupertino Icons font to your application. 35 | # Use with the CupertinoIcons class for iOS style icons. 36 | cupertino_icons: ^1.0.2 37 | 38 | http: ^0.13.4 39 | intl: ^0.17.0 40 | 41 | dev_dependencies: 42 | flutter_test: 43 | sdk: flutter 44 | 45 | # The "flutter_lints" package below contains a set of recommended lints to 46 | # encourage good coding practices. The lint set provided by the package is 47 | # activated in the `analysis_options.yaml` file located at the root of your 48 | # package. See that file for information about deactivating specific lint 49 | # rules and activating additional ones. 50 | flutter_lints: ^1.0.0 51 | 52 | # For information on the generic Dart part of this file, see the 53 | # following page: https://dart.dev/tools/pub/pubspec 54 | 55 | # The following section is specific to Flutter. 56 | flutter: 57 | 58 | # The following line ensures that the Material Icons font is 59 | # included with your application, so that you can use the icons in 60 | # the material Icons class. 61 | uses-material-design: true 62 | 63 | # To add assets to your application, add an assets section, like this: 64 | assets: 65 | - assets/ 66 | 67 | # An image asset can refer to one or more resolution-specific "variants", see 68 | # https://flutter.dev/assets-and-images/#resolution-aware. 69 | 70 | # For details regarding adding assets from package dependencies, see 71 | # https://flutter.dev/assets-and-images/#from-packages 72 | 73 | # To add custom fonts to your application, add a fonts section here, 74 | # in this "flutter" section. Each entry in this list should have a 75 | # "family" key with the font family name, and a "fonts" key with a 76 | # list giving the asset and other descriptors for the font. For 77 | # example: 78 | # fonts: 79 | # - family: Schyler 80 | # fonts: 81 | # - asset: fonts/Schyler-Regular.ttf 82 | # - asset: fonts/Schyler-Italic.ttf 83 | # style: italic 84 | # - family: Trajan Pro 85 | # fonts: 86 | # - asset: fonts/TrajanPro.ttf 87 | # - asset: fonts/TrajanPro_Bold.ttf 88 | # weight: 700 89 | # 90 | # For details regarding fonts from package dependencies, 91 | # see https://flutter.dev/custom-fonts/#from-packages 92 | -------------------------------------------------------------------------------- /pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See https://dart.dev/tools/pub/glossary#lockfile 3 | packages: 4 | async: 5 | dependency: transitive 6 | description: 7 | name: async 8 | url: "https://pub.dartlang.org" 9 | source: hosted 10 | version: "2.8.2" 11 | boolean_selector: 12 | dependency: transitive 13 | description: 14 | name: boolean_selector 15 | url: "https://pub.dartlang.org" 16 | source: hosted 17 | version: "2.1.0" 18 | characters: 19 | dependency: transitive 20 | description: 21 | name: characters 22 | url: "https://pub.dartlang.org" 23 | source: hosted 24 | version: "1.2.0" 25 | charcode: 26 | dependency: transitive 27 | description: 28 | name: charcode 29 | url: "https://pub.dartlang.org" 30 | source: hosted 31 | version: "1.3.1" 32 | clock: 33 | dependency: transitive 34 | description: 35 | name: clock 36 | url: "https://pub.dartlang.org" 37 | source: hosted 38 | version: "1.1.0" 39 | collection: 40 | dependency: transitive 41 | description: 42 | name: collection 43 | url: "https://pub.dartlang.org" 44 | source: hosted 45 | version: "1.15.0" 46 | cupertino_icons: 47 | dependency: "direct main" 48 | description: 49 | name: cupertino_icons 50 | url: "https://pub.dartlang.org" 51 | source: hosted 52 | version: "1.0.4" 53 | fake_async: 54 | dependency: transitive 55 | description: 56 | name: fake_async 57 | url: "https://pub.dartlang.org" 58 | source: hosted 59 | version: "1.2.0" 60 | flutter: 61 | dependency: "direct main" 62 | description: flutter 63 | source: sdk 64 | version: "0.0.0" 65 | flutter_lints: 66 | dependency: "direct dev" 67 | description: 68 | name: flutter_lints 69 | url: "https://pub.dartlang.org" 70 | source: hosted 71 | version: "1.0.4" 72 | flutter_test: 73 | dependency: "direct dev" 74 | description: flutter 75 | source: sdk 76 | version: "0.0.0" 77 | http: 78 | dependency: "direct main" 79 | description: 80 | name: http 81 | url: "https://pub.dartlang.org" 82 | source: hosted 83 | version: "0.13.4" 84 | http_parser: 85 | dependency: transitive 86 | description: 87 | name: http_parser 88 | url: "https://pub.dartlang.org" 89 | source: hosted 90 | version: "4.0.0" 91 | intl: 92 | dependency: "direct main" 93 | description: 94 | name: intl 95 | url: "https://pub.dartlang.org" 96 | source: hosted 97 | version: "0.17.0" 98 | lints: 99 | dependency: transitive 100 | description: 101 | name: lints 102 | url: "https://pub.dartlang.org" 103 | source: hosted 104 | version: "1.0.1" 105 | matcher: 106 | dependency: transitive 107 | description: 108 | name: matcher 109 | url: "https://pub.dartlang.org" 110 | source: hosted 111 | version: "0.12.11" 112 | material_color_utilities: 113 | dependency: transitive 114 | description: 115 | name: material_color_utilities 116 | url: "https://pub.dartlang.org" 117 | source: hosted 118 | version: "0.1.3" 119 | meta: 120 | dependency: transitive 121 | description: 122 | name: meta 123 | url: "https://pub.dartlang.org" 124 | source: hosted 125 | version: "1.7.0" 126 | path: 127 | dependency: transitive 128 | description: 129 | name: path 130 | url: "https://pub.dartlang.org" 131 | source: hosted 132 | version: "1.8.0" 133 | sky_engine: 134 | dependency: transitive 135 | description: flutter 136 | source: sdk 137 | version: "0.0.99" 138 | source_span: 139 | dependency: transitive 140 | description: 141 | name: source_span 142 | url: "https://pub.dartlang.org" 143 | source: hosted 144 | version: "1.8.1" 145 | stack_trace: 146 | dependency: transitive 147 | description: 148 | name: stack_trace 149 | url: "https://pub.dartlang.org" 150 | source: hosted 151 | version: "1.10.0" 152 | stream_channel: 153 | dependency: transitive 154 | description: 155 | name: stream_channel 156 | url: "https://pub.dartlang.org" 157 | source: hosted 158 | version: "2.1.0" 159 | string_scanner: 160 | dependency: transitive 161 | description: 162 | name: string_scanner 163 | url: "https://pub.dartlang.org" 164 | source: hosted 165 | version: "1.1.0" 166 | term_glyph: 167 | dependency: transitive 168 | description: 169 | name: term_glyph 170 | url: "https://pub.dartlang.org" 171 | source: hosted 172 | version: "1.2.0" 173 | test_api: 174 | dependency: transitive 175 | description: 176 | name: test_api 177 | url: "https://pub.dartlang.org" 178 | source: hosted 179 | version: "0.4.8" 180 | typed_data: 181 | dependency: transitive 182 | description: 183 | name: typed_data 184 | url: "https://pub.dartlang.org" 185 | source: hosted 186 | version: "1.3.0" 187 | vector_math: 188 | dependency: transitive 189 | description: 190 | name: vector_math 191 | url: "https://pub.dartlang.org" 192 | source: hosted 193 | version: "2.1.1" 194 | sdks: 195 | dart: ">=2.16.1 <3.0.0" 196 | -------------------------------------------------------------------------------- /lib/ui/home.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:flutter/material.dart'; 4 | import 'package:http/http.dart' as http; 5 | import 'package:intl/intl.dart'; 6 | import 'package:weather/models/city.dart'; 7 | import 'package:weather/models/constants.dart'; 8 | import 'package:weather/ui/detail_page.dart'; 9 | import 'package:weather/widgets/weather_item.dart'; 10 | 11 | class Home extends StatefulWidget { 12 | const Home({Key? key}) : super(key: key); 13 | 14 | @override 15 | State createState() => _HomeState(); 16 | } 17 | 18 | class _HomeState extends State { 19 | Constants myConstants = Constants(); 20 | 21 | //initiatilization 22 | int temperature = 0; 23 | int maxTemp = 0; 24 | String weatherStateName = 'Loading..'; 25 | int humidity = 0; 26 | int windSpeed = 0; 27 | 28 | var currentDate = 'Loading..'; 29 | String imageUrl = ''; 30 | int woeid = 31 | 44418; //This is the Where on Earth Id for London which is our default city 32 | String location = 'London'; //Our default city 33 | 34 | //get the cities and selected cities data 35 | var selectedCities = City.getSelectedCities(); 36 | List cities = [ 37 | 'London' 38 | ]; //the list to hold our selected cities. Deafult is London 39 | 40 | List consolidatedWeatherList = []; //To hold our weather data after api call 41 | 42 | //Api calls url 43 | String searchLocationUrl = 44 | 'https://www.metaweather.com/api/location/search/?query='; //To get the woeid 45 | String searchWeatherUrl = 46 | 'https://www.metaweather.com/api/location/'; //to get weather details using the woeid 47 | 48 | //Get the Where on earth id 49 | void fetchLocation(String location) async { 50 | var searchResult = await http.get(Uri.parse(searchLocationUrl + location)); 51 | var result = json.decode(searchResult.body)[0]; 52 | setState(() { 53 | woeid = result['woeid']; 54 | }); 55 | } 56 | 57 | void fetchWeatherData() async { 58 | var weatherResult = 59 | await http.get(Uri.parse(searchWeatherUrl + woeid.toString())); 60 | var result = json.decode(weatherResult.body); 61 | var consolidatedWeather = result['consolidated_weather']; 62 | 63 | setState(() { 64 | for (int i = 0; i < 7; i++) { 65 | consolidatedWeather.add(consolidatedWeather[ 66 | i]); //this takes the consolidated weather for the next six days for the location searched 67 | } 68 | //The index 0 referes to the first entry which is the current day. The next day will be index 1, second day index 2 etc... 69 | temperature = consolidatedWeather[0]['the_temp'].round(); 70 | weatherStateName = consolidatedWeather[0]['weather_state_name']; 71 | humidity = consolidatedWeather[0]['humidity'].round(); 72 | windSpeed = consolidatedWeather[0]['wind_speed'].round(); 73 | maxTemp = consolidatedWeather[0]['max_temp'].round(); 74 | 75 | //date formatting 76 | var myDate = DateTime.parse(consolidatedWeather[0]['applicable_date']); 77 | currentDate = DateFormat('EEEE, d MMMM').format(myDate); 78 | 79 | //set the image url 80 | imageUrl = weatherStateName 81 | .replaceAll(' ', '') 82 | .toLowerCase(); //remove any spaces in the weather state name 83 | //and change to lowercase because that is how we have named our images. 84 | 85 | consolidatedWeatherList = consolidatedWeather 86 | .toSet() 87 | .toList(); //Remove any instances of dublicates from our 88 | //consolidated weather LIST 89 | }); 90 | } 91 | 92 | @override 93 | void initState() { 94 | fetchLocation(cities[0]); 95 | fetchWeatherData(); 96 | 97 | //For all the selected cities from our City model, extract the city and add it to our original cities list 98 | for (int i = 0; i < selectedCities.length; i++) { 99 | cities.add(selectedCities[i].city); 100 | } 101 | super.initState(); 102 | } 103 | 104 | //Create a shader linear gradient 105 | final Shader linearGradient = const LinearGradient( 106 | colors: [Color(0xffABCFF2), Color(0xff9AC6F3)], 107 | ).createShader(const Rect.fromLTWH(0.0, 0.0, 200.0, 70.0)); 108 | 109 | @override 110 | Widget build(BuildContext context) { 111 | //Create a size variable for the mdeia query 112 | Size size = MediaQuery.of(context).size; 113 | 114 | return Scaffold( 115 | backgroundColor: Colors.white, 116 | appBar: AppBar( 117 | automaticallyImplyLeading: false, 118 | centerTitle: false, 119 | titleSpacing: 0, 120 | backgroundColor: Colors.white, 121 | elevation: 0.0, 122 | title: Container( 123 | padding: const EdgeInsets.symmetric(horizontal: 20), 124 | width: size.width, 125 | child: Row( 126 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 127 | crossAxisAlignment: CrossAxisAlignment.center, 128 | children: [ 129 | //Our profile image 130 | ClipRRect( 131 | borderRadius: const BorderRadius.all(Radius.circular(10)), 132 | child: Image.asset( 133 | 'assets/profile.png', 134 | width: 40, 135 | height: 40, 136 | ), 137 | ), 138 | //our location dropdown 139 | Row( 140 | crossAxisAlignment: CrossAxisAlignment.center, 141 | children: [ 142 | Image.asset( 143 | 'assets/pin.png', 144 | width: 20, 145 | ), 146 | const SizedBox( 147 | width: 4, 148 | ), 149 | DropdownButtonHideUnderline( 150 | child: DropdownButton( 151 | value: location, 152 | icon: const Icon(Icons.keyboard_arrow_down), 153 | items: cities.map((String location) { 154 | return DropdownMenuItem( 155 | value: location, child: Text(location)); 156 | }).toList(), 157 | onChanged: (String? newValue) { 158 | setState(() { 159 | location = newValue!; 160 | fetchLocation(location); 161 | fetchWeatherData(); 162 | }); 163 | }), 164 | ) 165 | ], 166 | ) 167 | ], 168 | ), 169 | ), 170 | ), 171 | body: Container( 172 | padding: const EdgeInsets.all(20), 173 | child: Column( 174 | crossAxisAlignment: CrossAxisAlignment.start, 175 | children: [ 176 | Text( 177 | location, 178 | style: const TextStyle( 179 | fontWeight: FontWeight.bold, 180 | fontSize: 30.0, 181 | ), 182 | ), 183 | Text( 184 | currentDate, 185 | style: const TextStyle( 186 | color: Colors.grey, 187 | fontSize: 16.0, 188 | ), 189 | ), 190 | const SizedBox( 191 | height: 50, 192 | ), 193 | Container( 194 | width: size.width, 195 | height: 200, 196 | decoration: BoxDecoration( 197 | color: myConstants.primaryColor, 198 | borderRadius: BorderRadius.circular(15), 199 | boxShadow: [ 200 | BoxShadow( 201 | color: myConstants.primaryColor.withOpacity(.5), 202 | offset: const Offset(0, 25), 203 | blurRadius: 10, 204 | spreadRadius: -12, 205 | ) 206 | ]), 207 | child: Stack( 208 | clipBehavior: Clip.none, 209 | children: [ 210 | Positioned( 211 | top: -40, 212 | left: 20, 213 | child: imageUrl == '' 214 | ? const Text('') 215 | : Image.asset( 216 | 'assets/' + imageUrl + '.png', 217 | width: 150, 218 | ), 219 | ), 220 | Positioned( 221 | bottom: 30, 222 | left: 20, 223 | child: Text( 224 | weatherStateName, 225 | style: const TextStyle( 226 | color: Colors.white, 227 | fontSize: 20, 228 | ), 229 | ), 230 | ), 231 | Positioned( 232 | top: 20, 233 | right: 20, 234 | child: Row( 235 | crossAxisAlignment: CrossAxisAlignment.start, 236 | children: [ 237 | Padding( 238 | padding: const EdgeInsets.only(top: 4.0), 239 | child: Text( 240 | temperature.toString(), 241 | style: TextStyle( 242 | fontSize: 80, 243 | fontWeight: FontWeight.bold, 244 | foreground: Paint()..shader = linearGradient, 245 | ), 246 | ), 247 | ), 248 | Text( 249 | 'o', 250 | style: TextStyle( 251 | fontSize: 40, 252 | fontWeight: FontWeight.bold, 253 | foreground: Paint()..shader = linearGradient, 254 | ), 255 | ) 256 | ], 257 | ), 258 | ), 259 | ], 260 | ), 261 | ), 262 | const SizedBox( 263 | height: 50, 264 | ), 265 | Container( 266 | padding: const EdgeInsets.symmetric(horizontal: 40), 267 | child: Row( 268 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 269 | children: [ 270 | weatherItem( 271 | text: 'Wind Speed', 272 | value: windSpeed, 273 | unit: 'km/h', 274 | imageUrl: 'assets/windspeed.png', 275 | ), 276 | weatherItem( 277 | text: 'Humidity', 278 | value: humidity, 279 | unit: '', 280 | imageUrl: 'assets/humidity.png'), 281 | weatherItem( 282 | text: 'Wind Speed', 283 | value: maxTemp, 284 | unit: 'C', 285 | imageUrl: 'assets/max-temp.png', 286 | ), 287 | ], 288 | ), 289 | ), 290 | const SizedBox( 291 | height: 50, 292 | ), 293 | Row( 294 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 295 | crossAxisAlignment: CrossAxisAlignment.center, 296 | children: [ 297 | const Text( 298 | 'Today', 299 | style: TextStyle( 300 | fontWeight: FontWeight.bold, 301 | fontSize: 24, 302 | ), 303 | ), 304 | Text( 305 | 'Next 7 Days', 306 | style: TextStyle( 307 | fontWeight: FontWeight.w600, 308 | fontSize: 18, 309 | color: myConstants.primaryColor), 310 | ), 311 | ], 312 | ), 313 | const SizedBox( 314 | height: 20, 315 | ), 316 | Expanded( 317 | child: ListView.builder( 318 | scrollDirection: Axis.horizontal, 319 | itemCount: consolidatedWeatherList.length, 320 | itemBuilder: (BuildContext context, int index) { 321 | String today = DateTime.now().toString().substring(0, 10); 322 | var selectedDay = 323 | consolidatedWeatherList[index]['applicable_date']; 324 | var futureWeatherName = 325 | consolidatedWeatherList[index]['weather_state_name']; 326 | var weatherUrl = 327 | futureWeatherName.replaceAll(' ', '').toLowerCase(); 328 | 329 | var parsedDate = DateTime.parse( 330 | consolidatedWeatherList[index]['applicable_date']); 331 | var newDate = DateFormat('EEEE') 332 | .format(parsedDate) 333 | .substring(0, 3); //formateed date 334 | 335 | return GestureDetector( 336 | onTap: () { 337 | Navigator.push(context, MaterialPageRoute(builder: (context) => DetailPage(consolidatedWeatherList: consolidatedWeatherList, selectedId: index, location: location,))); 338 | }, 339 | child: Container( 340 | padding: const EdgeInsets.symmetric(vertical: 20), 341 | margin: const EdgeInsets.only( 342 | right: 20, bottom: 10, top: 10), 343 | width: 80, 344 | decoration: BoxDecoration( 345 | color: selectedDay == today 346 | ? myConstants.primaryColor 347 | : Colors.white, 348 | borderRadius: 349 | const BorderRadius.all(Radius.circular(10)), 350 | boxShadow: [ 351 | BoxShadow( 352 | offset: const Offset(0, 1), 353 | blurRadius: 5, 354 | color: selectedDay == today 355 | ? myConstants.primaryColor 356 | : Colors.black54.withOpacity(.2), 357 | ), 358 | ]), 359 | child: Column( 360 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 361 | children: [ 362 | Text( 363 | consolidatedWeatherList[index]['the_temp'] 364 | .round() 365 | .toString() + 366 | "C", 367 | style: TextStyle( 368 | fontSize: 17, 369 | color: selectedDay == today 370 | ? Colors.white 371 | : myConstants.primaryColor, 372 | fontWeight: FontWeight.w500, 373 | ), 374 | ), 375 | Image.asset( 376 | 'assets/' + weatherUrl + '.png', 377 | width: 30, 378 | ), 379 | Text( 380 | newDate, 381 | style: TextStyle( 382 | fontSize: 17, 383 | color: selectedDay == today 384 | ? Colors.white 385 | : myConstants.primaryColor, 386 | fontWeight: FontWeight.w500, 387 | ), 388 | ) 389 | ], 390 | ), 391 | ), 392 | ); 393 | })) 394 | ], 395 | ), 396 | ), 397 | ); 398 | } 399 | } 400 | -------------------------------------------------------------------------------- /lib/ui/detail_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:intl/intl.dart'; 3 | import 'package:weather/models/constants.dart'; 4 | import 'package:weather/ui/welcome.dart'; 5 | import 'package:weather/widgets/weather_item.dart'; 6 | 7 | class DetailPage extends StatefulWidget { 8 | final List consolidatedWeatherList; 9 | final int selectedId; 10 | final String location; 11 | 12 | const DetailPage( 13 | {Key? key, 14 | required this.consolidatedWeatherList, 15 | required this.selectedId, 16 | required this.location}) 17 | : super(key: key); 18 | 19 | @override 20 | State createState() => _DetailPageState(); 21 | } 22 | 23 | class _DetailPageState extends State { 24 | String imageUrl = ''; 25 | 26 | @override 27 | Widget build(BuildContext context) { 28 | Size size = MediaQuery.of(context).size; 29 | Constants myConstants = Constants(); 30 | 31 | //Create a shader linear gradient 32 | final Shader linearGradient = const LinearGradient( 33 | colors: [Color(0xffABCFF2), Color(0xff9AC6F3)], 34 | ).createShader(const Rect.fromLTWH(0.0, 0.0, 200.0, 70.0)); 35 | 36 | int selectedIndex = widget.selectedId; 37 | var weatherStateName = 38 | widget.consolidatedWeatherList[selectedIndex]['weather_state_name']; 39 | imageUrl = weatherStateName.replaceAll(' ', '').toLowerCase(); 40 | 41 | return Scaffold( 42 | backgroundColor: myConstants.secondaryColor, 43 | appBar: AppBar( 44 | centerTitle: true, 45 | backgroundColor: myConstants.secondaryColor, 46 | elevation: 0.0, 47 | title: Text(widget.location), 48 | actions: [ 49 | Padding( 50 | padding: const EdgeInsets.only(right: 8.0), 51 | child: IconButton( 52 | onPressed: () { 53 | Navigator.push(context, 54 | MaterialPageRoute(builder: (context) => const Welcome())); 55 | }, 56 | icon: const Icon(Icons.settings)), 57 | ) 58 | ], 59 | ), 60 | body: Stack( 61 | alignment: Alignment.center, 62 | clipBehavior: Clip.none, 63 | children: [ 64 | Positioned( 65 | top: 10, 66 | left: 10, 67 | child: SizedBox( 68 | height: 150, 69 | width: 400, 70 | child: ListView.builder( 71 | scrollDirection: Axis.horizontal, 72 | itemCount: widget.consolidatedWeatherList.length, 73 | itemBuilder: (BuildContext context, int index) { 74 | var futureWeatherName = widget 75 | .consolidatedWeatherList[index]['weather_state_name']; 76 | var weatherURL = 77 | futureWeatherName.replaceAll(' ', '').toLowerCase(); 78 | var parsedDate = DateTime.parse(widget 79 | .consolidatedWeatherList[index]['applicable_date']); 80 | var newDate = 81 | DateFormat('EEEE').format(parsedDate).substring(0, 3); 82 | 83 | return Container( 84 | padding: const EdgeInsets.symmetric(vertical: 20), 85 | margin: const EdgeInsets.only(right: 20), 86 | width: 80, 87 | decoration: BoxDecoration( 88 | color: index == selectedIndex 89 | ? Colors.white 90 | : const Color(0xff9ebcf9), 91 | borderRadius: 92 | const BorderRadius.all(Radius.circular(10)), 93 | boxShadow: [ 94 | BoxShadow( 95 | offset: const Offset(0, 1), 96 | blurRadius: 5, 97 | color: Colors.blue.withOpacity(.3), 98 | ) 99 | ]), 100 | child: Column( 101 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 102 | children: [ 103 | Text( 104 | widget.consolidatedWeatherList[index]['the_temp'] 105 | .round() 106 | .toString() + 107 | "C", 108 | style: TextStyle( 109 | fontSize: 17, 110 | color: index == selectedIndex 111 | ? Colors.blue 112 | : Colors.white, 113 | fontWeight: FontWeight.w500, 114 | ), 115 | ), 116 | Image.asset( 117 | 'assets/' + weatherURL + ".png", 118 | width: 40, 119 | ), 120 | Text( 121 | newDate, 122 | style: TextStyle( 123 | fontSize: 17, 124 | color: index == selectedIndex 125 | ? Colors.blue 126 | : Colors.white, 127 | fontWeight: FontWeight.w500, 128 | ), 129 | ), 130 | ], 131 | ), 132 | ); 133 | }), 134 | ), 135 | ), 136 | Positioned( 137 | bottom: 0, 138 | left: 0, 139 | child: Container( 140 | height: size.height * .55, 141 | width: size.width, 142 | decoration: const BoxDecoration( 143 | color: Colors.white, 144 | borderRadius: BorderRadius.only( 145 | topRight: Radius.circular(50), 146 | topLeft: Radius.circular(50), 147 | )), 148 | child: Stack( 149 | clipBehavior: Clip.none, 150 | children: [ 151 | Positioned( 152 | top: -50, 153 | right: 20, 154 | left: 20, 155 | child: Container( 156 | width: size.width * .7, 157 | height: 300, 158 | decoration: BoxDecoration( 159 | gradient: LinearGradient( 160 | begin: Alignment.topLeft, 161 | end: Alignment.center, 162 | colors: [ 163 | Color(0xffa9c1f5), 164 | Color(0xff6696f5), 165 | ]), 166 | borderRadius: BorderRadius.circular(15), 167 | boxShadow: [ 168 | BoxShadow( 169 | color: Colors.blue.withOpacity(.1), 170 | offset: const Offset(0, 25), 171 | blurRadius: 3, 172 | spreadRadius: -10, 173 | ), 174 | ]), 175 | child: Stack( 176 | clipBehavior: Clip.none, 177 | children: [ 178 | Positioned( 179 | top: -40, 180 | left: 20, 181 | child: Image.asset( 182 | 'assets/' + imageUrl + '.png', 183 | width: 150, 184 | ), 185 | ), 186 | Positioned( 187 | top: 120, 188 | left: 30, 189 | child: Padding( 190 | padding: const EdgeInsets.only(bottom: 10.0), 191 | child: Text( 192 | weatherStateName, 193 | style: const TextStyle( 194 | color: Colors.white, 195 | fontSize: 20, 196 | ), 197 | ), 198 | )), 199 | Positioned( 200 | bottom: 20, 201 | left: 20, 202 | child: Container( 203 | width: size.width * .8, 204 | padding: 205 | const EdgeInsets.symmetric(horizontal: 20), 206 | child: Row( 207 | mainAxisAlignment: 208 | MainAxisAlignment.spaceBetween, 209 | children: [ 210 | weatherItem( 211 | text: 'Wind Speed', 212 | value: widget 213 | .consolidatedWeatherList[selectedIndex] 214 | ['wind_speed'] 215 | .round(), 216 | unit: 'km/h', 217 | imageUrl: 'assets/windspeed.png', 218 | ), 219 | weatherItem( 220 | text: 'Humidity', 221 | value: widget.consolidatedWeatherList[ 222 | selectedIndex]['humidity'] 223 | .round(), 224 | unit: '', 225 | imageUrl: 'assets/humidity.png'), 226 | weatherItem( 227 | text: 'Max Temp', 228 | value: widget 229 | .consolidatedWeatherList[selectedIndex] 230 | ['max_temp'] 231 | .round(), 232 | unit: 'C', 233 | imageUrl: 'assets/max-temp.png', 234 | ), 235 | ], 236 | ), 237 | ), 238 | ), 239 | Positioned( 240 | top: 20, 241 | right: 20, 242 | child: Row( 243 | crossAxisAlignment: CrossAxisAlignment.start, 244 | children: [ 245 | Text( 246 | widget.consolidatedWeatherList[selectedIndex] 247 | ['the_temp'] 248 | .round() 249 | .toString(), 250 | style: TextStyle( 251 | fontSize: 80, 252 | fontWeight: FontWeight.bold, 253 | foreground: Paint() 254 | ..shader = linearGradient, 255 | ), 256 | ), 257 | Text( 258 | 'o', 259 | style: TextStyle( 260 | fontSize: 40, 261 | fontWeight: FontWeight.bold, 262 | foreground: Paint() 263 | ..shader = linearGradient, 264 | ), 265 | ), 266 | ], 267 | ), 268 | ), 269 | ], 270 | ), 271 | ), 272 | ), 273 | Positioned( 274 | top: 300, 275 | left: 20, 276 | child: SizedBox( 277 | height: 200, 278 | width: size.width * .9, 279 | child: ListView.builder( 280 | scrollDirection: Axis.vertical, 281 | itemCount: 282 | widget.consolidatedWeatherList.length, 283 | itemBuilder: 284 | (BuildContext context, int index) { 285 | var futureWeatherName = 286 | widget.consolidatedWeatherList[index] 287 | ['weather_state_name']; 288 | var futureImageURL = futureWeatherName 289 | .replaceAll(' ', '') 290 | .toLowerCase(); 291 | var myDate = DateTime.parse( 292 | widget.consolidatedWeatherList[index] 293 | ['applicable_date']); 294 | var currentDate = 295 | DateFormat('d MMMM, EEEE') 296 | .format(myDate); 297 | return Container( 298 | margin: const EdgeInsets.only( 299 | left: 10, 300 | top: 10, 301 | right: 10, 302 | bottom: 5), 303 | height: 80, 304 | width: size.width, 305 | decoration: BoxDecoration( 306 | color: Colors.white, 307 | borderRadius: 308 | const BorderRadius.all( 309 | Radius.circular(10)), 310 | boxShadow: [ 311 | BoxShadow( 312 | color: myConstants 313 | .secondaryColor 314 | .withOpacity(.1), 315 | spreadRadius: 5, 316 | blurRadius: 20, 317 | offset: const Offset(0, 3), 318 | ), 319 | ]), 320 | child: Padding( 321 | padding: const EdgeInsets.all(8.0), 322 | child: Row( 323 | mainAxisAlignment: 324 | MainAxisAlignment.spaceBetween, 325 | crossAxisAlignment: 326 | CrossAxisAlignment.center, 327 | children: [ 328 | Text( 329 | currentDate, 330 | style: const TextStyle( 331 | color: Color(0xff6696f5), 332 | ), 333 | ), 334 | Row( 335 | children: [ 336 | Text( 337 | widget 338 | .consolidatedWeatherList[ 339 | index]['max_temp'] 340 | .round() 341 | .toString(), 342 | style: const TextStyle( 343 | color: Colors.grey, 344 | fontSize: 30, 345 | fontWeight: 346 | FontWeight.w600, 347 | ), 348 | ), 349 | const Text( 350 | '/', 351 | style: TextStyle( 352 | color: Colors.grey, 353 | fontSize: 30, 354 | ), 355 | ), 356 | Text( 357 | widget 358 | .consolidatedWeatherList[ 359 | index]['min_temp'] 360 | .round() 361 | .toString(), 362 | style: const TextStyle( 363 | color: Colors.grey, 364 | fontSize: 25, 365 | ), 366 | ), 367 | ], 368 | ), 369 | Column( 370 | mainAxisAlignment: 371 | MainAxisAlignment.center, 372 | children: [ 373 | Image.asset( 374 | 'assets/' + 375 | futureImageURL + 376 | '.png', 377 | width: 30, 378 | ), 379 | Text(widget.consolidatedWeatherList[ 380 | index] 381 | ['weather_state_name']), 382 | ], 383 | ) 384 | ], 385 | ), 386 | ), 387 | ); 388 | }), 389 | )) 390 | ], 391 | ), 392 | ), 393 | ), 394 | ], 395 | ), 396 | ); 397 | } 398 | } 399 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 50; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 11 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 12 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 13 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 14 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 15 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; 16 | /* End PBXBuildFile section */ 17 | 18 | /* Begin PBXCopyFilesBuildPhase section */ 19 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = { 20 | isa = PBXCopyFilesBuildPhase; 21 | buildActionMask = 2147483647; 22 | dstPath = ""; 23 | dstSubfolderSpec = 10; 24 | files = ( 25 | ); 26 | name = "Embed Frameworks"; 27 | runOnlyForDeploymentPostprocessing = 0; 28 | }; 29 | /* End PBXCopyFilesBuildPhase section */ 30 | 31 | /* Begin PBXFileReference section */ 32 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 33 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 34 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 35 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 36 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 37 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 38 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 39 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 40 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 41 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 42 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 43 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 44 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 45 | /* End PBXFileReference section */ 46 | 47 | /* Begin PBXFrameworksBuildPhase section */ 48 | 97C146EB1CF9000F007C117D /* Frameworks */ = { 49 | isa = PBXFrameworksBuildPhase; 50 | buildActionMask = 2147483647; 51 | files = ( 52 | ); 53 | runOnlyForDeploymentPostprocessing = 0; 54 | }; 55 | /* End PBXFrameworksBuildPhase section */ 56 | 57 | /* Begin PBXGroup section */ 58 | 9740EEB11CF90186004384FC /* Flutter */ = { 59 | isa = PBXGroup; 60 | children = ( 61 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, 62 | 9740EEB21CF90195004384FC /* Debug.xcconfig */, 63 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 64 | 9740EEB31CF90195004384FC /* Generated.xcconfig */, 65 | ); 66 | name = Flutter; 67 | sourceTree = ""; 68 | }; 69 | 97C146E51CF9000F007C117D = { 70 | isa = PBXGroup; 71 | children = ( 72 | 9740EEB11CF90186004384FC /* Flutter */, 73 | 97C146F01CF9000F007C117D /* Runner */, 74 | 97C146EF1CF9000F007C117D /* Products */, 75 | ); 76 | sourceTree = ""; 77 | }; 78 | 97C146EF1CF9000F007C117D /* Products */ = { 79 | isa = PBXGroup; 80 | children = ( 81 | 97C146EE1CF9000F007C117D /* Runner.app */, 82 | ); 83 | name = Products; 84 | sourceTree = ""; 85 | }; 86 | 97C146F01CF9000F007C117D /* Runner */ = { 87 | isa = PBXGroup; 88 | children = ( 89 | 97C146FA1CF9000F007C117D /* Main.storyboard */, 90 | 97C146FD1CF9000F007C117D /* Assets.xcassets */, 91 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, 92 | 97C147021CF9000F007C117D /* Info.plist */, 93 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, 94 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, 95 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, 96 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, 97 | ); 98 | path = Runner; 99 | sourceTree = ""; 100 | }; 101 | /* End PBXGroup section */ 102 | 103 | /* Begin PBXNativeTarget section */ 104 | 97C146ED1CF9000F007C117D /* Runner */ = { 105 | isa = PBXNativeTarget; 106 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; 107 | buildPhases = ( 108 | 9740EEB61CF901F6004384FC /* Run Script */, 109 | 97C146EA1CF9000F007C117D /* Sources */, 110 | 97C146EB1CF9000F007C117D /* Frameworks */, 111 | 97C146EC1CF9000F007C117D /* Resources */, 112 | 9705A1C41CF9048500538489 /* Embed Frameworks */, 113 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 114 | ); 115 | buildRules = ( 116 | ); 117 | dependencies = ( 118 | ); 119 | name = Runner; 120 | productName = Runner; 121 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */; 122 | productType = "com.apple.product-type.application"; 123 | }; 124 | /* End PBXNativeTarget section */ 125 | 126 | /* Begin PBXProject section */ 127 | 97C146E61CF9000F007C117D /* Project object */ = { 128 | isa = PBXProject; 129 | attributes = { 130 | LastUpgradeCheck = 1300; 131 | ORGANIZATIONNAME = ""; 132 | TargetAttributes = { 133 | 97C146ED1CF9000F007C117D = { 134 | CreatedOnToolsVersion = 7.3.1; 135 | LastSwiftMigration = 1100; 136 | }; 137 | }; 138 | }; 139 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; 140 | compatibilityVersion = "Xcode 9.3"; 141 | developmentRegion = en; 142 | hasScannedForEncodings = 0; 143 | knownRegions = ( 144 | en, 145 | Base, 146 | ); 147 | mainGroup = 97C146E51CF9000F007C117D; 148 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */; 149 | projectDirPath = ""; 150 | projectRoot = ""; 151 | targets = ( 152 | 97C146ED1CF9000F007C117D /* Runner */, 153 | ); 154 | }; 155 | /* End PBXProject section */ 156 | 157 | /* Begin PBXResourcesBuildPhase section */ 158 | 97C146EC1CF9000F007C117D /* Resources */ = { 159 | isa = PBXResourcesBuildPhase; 160 | buildActionMask = 2147483647; 161 | files = ( 162 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, 163 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, 164 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, 165 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, 166 | ); 167 | runOnlyForDeploymentPostprocessing = 0; 168 | }; 169 | /* End PBXResourcesBuildPhase section */ 170 | 171 | /* Begin PBXShellScriptBuildPhase section */ 172 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { 173 | isa = PBXShellScriptBuildPhase; 174 | buildActionMask = 2147483647; 175 | files = ( 176 | ); 177 | inputPaths = ( 178 | ); 179 | name = "Thin Binary"; 180 | outputPaths = ( 181 | ); 182 | runOnlyForDeploymentPostprocessing = 0; 183 | shellPath = /bin/sh; 184 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; 185 | }; 186 | 9740EEB61CF901F6004384FC /* Run Script */ = { 187 | isa = PBXShellScriptBuildPhase; 188 | buildActionMask = 2147483647; 189 | files = ( 190 | ); 191 | inputPaths = ( 192 | ); 193 | name = "Run Script"; 194 | outputPaths = ( 195 | ); 196 | runOnlyForDeploymentPostprocessing = 0; 197 | shellPath = /bin/sh; 198 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; 199 | }; 200 | /* End PBXShellScriptBuildPhase section */ 201 | 202 | /* Begin PBXSourcesBuildPhase section */ 203 | 97C146EA1CF9000F007C117D /* Sources */ = { 204 | isa = PBXSourcesBuildPhase; 205 | buildActionMask = 2147483647; 206 | files = ( 207 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, 208 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, 209 | ); 210 | runOnlyForDeploymentPostprocessing = 0; 211 | }; 212 | /* End PBXSourcesBuildPhase section */ 213 | 214 | /* Begin PBXVariantGroup section */ 215 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = { 216 | isa = PBXVariantGroup; 217 | children = ( 218 | 97C146FB1CF9000F007C117D /* Base */, 219 | ); 220 | name = Main.storyboard; 221 | sourceTree = ""; 222 | }; 223 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { 224 | isa = PBXVariantGroup; 225 | children = ( 226 | 97C147001CF9000F007C117D /* Base */, 227 | ); 228 | name = LaunchScreen.storyboard; 229 | sourceTree = ""; 230 | }; 231 | /* End PBXVariantGroup section */ 232 | 233 | /* Begin XCBuildConfiguration section */ 234 | 249021D3217E4FDB00AE95B9 /* Profile */ = { 235 | isa = XCBuildConfiguration; 236 | buildSettings = { 237 | ALWAYS_SEARCH_USER_PATHS = NO; 238 | CLANG_ANALYZER_NONNULL = YES; 239 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 240 | CLANG_CXX_LIBRARY = "libc++"; 241 | CLANG_ENABLE_MODULES = YES; 242 | CLANG_ENABLE_OBJC_ARC = YES; 243 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 244 | CLANG_WARN_BOOL_CONVERSION = YES; 245 | CLANG_WARN_COMMA = YES; 246 | CLANG_WARN_CONSTANT_CONVERSION = YES; 247 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 248 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 249 | CLANG_WARN_EMPTY_BODY = YES; 250 | CLANG_WARN_ENUM_CONVERSION = YES; 251 | CLANG_WARN_INFINITE_RECURSION = YES; 252 | CLANG_WARN_INT_CONVERSION = YES; 253 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 254 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 255 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 256 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 257 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 258 | CLANG_WARN_STRICT_PROTOTYPES = YES; 259 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 260 | CLANG_WARN_UNREACHABLE_CODE = YES; 261 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 262 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 263 | COPY_PHASE_STRIP = NO; 264 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 265 | ENABLE_NS_ASSERTIONS = NO; 266 | ENABLE_STRICT_OBJC_MSGSEND = YES; 267 | GCC_C_LANGUAGE_STANDARD = gnu99; 268 | GCC_NO_COMMON_BLOCKS = YES; 269 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 270 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 271 | GCC_WARN_UNDECLARED_SELECTOR = YES; 272 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 273 | GCC_WARN_UNUSED_FUNCTION = YES; 274 | GCC_WARN_UNUSED_VARIABLE = YES; 275 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 276 | MTL_ENABLE_DEBUG_INFO = NO; 277 | SDKROOT = iphoneos; 278 | SUPPORTED_PLATFORMS = iphoneos; 279 | TARGETED_DEVICE_FAMILY = "1,2"; 280 | VALIDATE_PRODUCT = YES; 281 | }; 282 | name = Profile; 283 | }; 284 | 249021D4217E4FDB00AE95B9 /* Profile */ = { 285 | isa = XCBuildConfiguration; 286 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 287 | buildSettings = { 288 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 289 | CLANG_ENABLE_MODULES = YES; 290 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 291 | DEVELOPMENT_TEAM = 8WA8K48L42; 292 | ENABLE_BITCODE = NO; 293 | INFOPLIST_FILE = Runner/Info.plist; 294 | LD_RUNPATH_SEARCH_PATHS = ( 295 | "$(inherited)", 296 | "@executable_path/Frameworks", 297 | ); 298 | PRODUCT_BUNDLE_IDENTIFIER = com.example.weather; 299 | PRODUCT_NAME = "$(TARGET_NAME)"; 300 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 301 | SWIFT_VERSION = 5.0; 302 | VERSIONING_SYSTEM = "apple-generic"; 303 | }; 304 | name = Profile; 305 | }; 306 | 97C147031CF9000F007C117D /* Debug */ = { 307 | isa = XCBuildConfiguration; 308 | buildSettings = { 309 | ALWAYS_SEARCH_USER_PATHS = NO; 310 | CLANG_ANALYZER_NONNULL = YES; 311 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 312 | CLANG_CXX_LIBRARY = "libc++"; 313 | CLANG_ENABLE_MODULES = YES; 314 | CLANG_ENABLE_OBJC_ARC = YES; 315 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 316 | CLANG_WARN_BOOL_CONVERSION = YES; 317 | CLANG_WARN_COMMA = YES; 318 | CLANG_WARN_CONSTANT_CONVERSION = YES; 319 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 320 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 321 | CLANG_WARN_EMPTY_BODY = YES; 322 | CLANG_WARN_ENUM_CONVERSION = YES; 323 | CLANG_WARN_INFINITE_RECURSION = YES; 324 | CLANG_WARN_INT_CONVERSION = YES; 325 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 326 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 327 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 328 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 329 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 330 | CLANG_WARN_STRICT_PROTOTYPES = YES; 331 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 332 | CLANG_WARN_UNREACHABLE_CODE = YES; 333 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 334 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 335 | COPY_PHASE_STRIP = NO; 336 | DEBUG_INFORMATION_FORMAT = dwarf; 337 | ENABLE_STRICT_OBJC_MSGSEND = YES; 338 | ENABLE_TESTABILITY = YES; 339 | GCC_C_LANGUAGE_STANDARD = gnu99; 340 | GCC_DYNAMIC_NO_PIC = NO; 341 | GCC_NO_COMMON_BLOCKS = YES; 342 | GCC_OPTIMIZATION_LEVEL = 0; 343 | GCC_PREPROCESSOR_DEFINITIONS = ( 344 | "DEBUG=1", 345 | "$(inherited)", 346 | ); 347 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 348 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 349 | GCC_WARN_UNDECLARED_SELECTOR = YES; 350 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 351 | GCC_WARN_UNUSED_FUNCTION = YES; 352 | GCC_WARN_UNUSED_VARIABLE = YES; 353 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 354 | MTL_ENABLE_DEBUG_INFO = YES; 355 | ONLY_ACTIVE_ARCH = YES; 356 | SDKROOT = iphoneos; 357 | TARGETED_DEVICE_FAMILY = "1,2"; 358 | }; 359 | name = Debug; 360 | }; 361 | 97C147041CF9000F007C117D /* Release */ = { 362 | isa = XCBuildConfiguration; 363 | buildSettings = { 364 | ALWAYS_SEARCH_USER_PATHS = NO; 365 | CLANG_ANALYZER_NONNULL = YES; 366 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 367 | CLANG_CXX_LIBRARY = "libc++"; 368 | CLANG_ENABLE_MODULES = YES; 369 | CLANG_ENABLE_OBJC_ARC = YES; 370 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 371 | CLANG_WARN_BOOL_CONVERSION = YES; 372 | CLANG_WARN_COMMA = YES; 373 | CLANG_WARN_CONSTANT_CONVERSION = YES; 374 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 375 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 376 | CLANG_WARN_EMPTY_BODY = YES; 377 | CLANG_WARN_ENUM_CONVERSION = YES; 378 | CLANG_WARN_INFINITE_RECURSION = YES; 379 | CLANG_WARN_INT_CONVERSION = YES; 380 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 381 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 382 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 383 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 384 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 385 | CLANG_WARN_STRICT_PROTOTYPES = YES; 386 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 387 | CLANG_WARN_UNREACHABLE_CODE = YES; 388 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 389 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 390 | COPY_PHASE_STRIP = NO; 391 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 392 | ENABLE_NS_ASSERTIONS = NO; 393 | ENABLE_STRICT_OBJC_MSGSEND = YES; 394 | GCC_C_LANGUAGE_STANDARD = gnu99; 395 | GCC_NO_COMMON_BLOCKS = YES; 396 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 397 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 398 | GCC_WARN_UNDECLARED_SELECTOR = YES; 399 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 400 | GCC_WARN_UNUSED_FUNCTION = YES; 401 | GCC_WARN_UNUSED_VARIABLE = YES; 402 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 403 | MTL_ENABLE_DEBUG_INFO = NO; 404 | SDKROOT = iphoneos; 405 | SUPPORTED_PLATFORMS = iphoneos; 406 | SWIFT_COMPILATION_MODE = wholemodule; 407 | SWIFT_OPTIMIZATION_LEVEL = "-O"; 408 | TARGETED_DEVICE_FAMILY = "1,2"; 409 | VALIDATE_PRODUCT = YES; 410 | }; 411 | name = Release; 412 | }; 413 | 97C147061CF9000F007C117D /* Debug */ = { 414 | isa = XCBuildConfiguration; 415 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 416 | buildSettings = { 417 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 418 | CLANG_ENABLE_MODULES = YES; 419 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 420 | DEVELOPMENT_TEAM = 8WA8K48L42; 421 | ENABLE_BITCODE = NO; 422 | INFOPLIST_FILE = Runner/Info.plist; 423 | LD_RUNPATH_SEARCH_PATHS = ( 424 | "$(inherited)", 425 | "@executable_path/Frameworks", 426 | ); 427 | PRODUCT_BUNDLE_IDENTIFIER = com.example.weather; 428 | PRODUCT_NAME = "$(TARGET_NAME)"; 429 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 430 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 431 | SWIFT_VERSION = 5.0; 432 | VERSIONING_SYSTEM = "apple-generic"; 433 | }; 434 | name = Debug; 435 | }; 436 | 97C147071CF9000F007C117D /* Release */ = { 437 | isa = XCBuildConfiguration; 438 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 439 | buildSettings = { 440 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 441 | CLANG_ENABLE_MODULES = YES; 442 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 443 | DEVELOPMENT_TEAM = 8WA8K48L42; 444 | ENABLE_BITCODE = NO; 445 | INFOPLIST_FILE = Runner/Info.plist; 446 | LD_RUNPATH_SEARCH_PATHS = ( 447 | "$(inherited)", 448 | "@executable_path/Frameworks", 449 | ); 450 | PRODUCT_BUNDLE_IDENTIFIER = com.example.weather; 451 | PRODUCT_NAME = "$(TARGET_NAME)"; 452 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 453 | SWIFT_VERSION = 5.0; 454 | VERSIONING_SYSTEM = "apple-generic"; 455 | }; 456 | name = Release; 457 | }; 458 | /* End XCBuildConfiguration section */ 459 | 460 | /* Begin XCConfigurationList section */ 461 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { 462 | isa = XCConfigurationList; 463 | buildConfigurations = ( 464 | 97C147031CF9000F007C117D /* Debug */, 465 | 97C147041CF9000F007C117D /* Release */, 466 | 249021D3217E4FDB00AE95B9 /* Profile */, 467 | ); 468 | defaultConfigurationIsVisible = 0; 469 | defaultConfigurationName = Release; 470 | }; 471 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { 472 | isa = XCConfigurationList; 473 | buildConfigurations = ( 474 | 97C147061CF9000F007C117D /* Debug */, 475 | 97C147071CF9000F007C117D /* Release */, 476 | 249021D4217E4FDB00AE95B9 /* Profile */, 477 | ); 478 | defaultConfigurationIsVisible = 0; 479 | defaultConfigurationName = Release; 480 | }; 481 | /* End XCConfigurationList section */ 482 | }; 483 | rootObject = 97C146E61CF9000F007C117D /* Project object */; 484 | } 485 | --------------------------------------------------------------------------------