diff --git a/.metadata b/.metadata index 0f055bf..cb12308 100644 --- a/.metadata +++ b/.metadata @@ -4,7 +4,7 @@ # This file should be version controlled and should not be manually edited. version: - revision: ffb2ecea5223acdd139a5039be2f9c796962833d + revision: 3595343e20a61ff16d14e8ecc25f364276bb1b8b channel: stable project_type: app diff --git a/README.md b/README.md index 9152445..e7b8b35 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,6 @@ -# Flutter Course Code +# weather_app + +A new Flutter application. ## Getting Started diff --git a/android/app/build.gradle b/android/app/build.gradle index 617083c..cf4e5ed 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -43,7 +43,7 @@ android { defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "com.example.contacts_01" + applicationId "com.example.weather_app" minSdkVersion 16 targetSdkVersion 30 versionCode flutterVersionCode.toInteger() diff --git a/android/app/src/debug/AndroidManifest.xml b/android/app/src/debug/AndroidManifest.xml index 47d7ea9..7c46bf4 100644 --- a/android/app/src/debug/AndroidManifest.xml +++ b/android/app/src/debug/AndroidManifest.xml @@ -1,5 +1,5 @@ + package="com.example.weather_app"> diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 609e8ad..0efa4ee 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -1,7 +1,7 @@ + package="com.example.weather_app"> - + - + android:src="@mipmap/ic_launcher" /> + diff --git a/android/app/src/main/res/drawable/launch_background.xml b/android/app/src/main/res/drawable/launch_background.xml index 304732f..2f35710 100644 --- a/android/app/src/main/res/drawable/launch_background.xml +++ b/android/app/src/main/res/drawable/launch_background.xml @@ -1,12 +1,12 @@ - + - + android:src="@mipmap/ic_launcher" /> + diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png index db77bb4..afb5f39 100644 Binary files a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png index 17987b7..0feb4df 100644 Binary files a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png index 09d4391..bb50465 100644 Binary files a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png index d5f1c8d..fd60aa5 100644 Binary files a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png index 4d6372e..2619b91 100644 Binary files a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png and b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/values/color.xml b/android/app/src/main/res/values/color.xml new file mode 100644 index 0000000..68b2452 --- /dev/null +++ b/android/app/src/main/res/values/color.xml @@ -0,0 +1,4 @@ + + +#64b5f6 + \ No newline at end of file diff --git a/android/app/src/profile/AndroidManifest.xml b/android/app/src/profile/AndroidManifest.xml index 47d7ea9..7c46bf4 100644 --- a/android/app/src/profile/AndroidManifest.xml +++ b/android/app/src/profile/AndroidManifest.xml @@ -1,5 +1,5 @@ + package="com.example.weather_app"> diff --git a/assets/icons/01d.png b/assets/icons/01d.png new file mode 100644 index 0000000..b7fdbe1 Binary files /dev/null and b/assets/icons/01d.png differ diff --git a/assets/icons/01n.png b/assets/icons/01n.png new file mode 100644 index 0000000..a5a0071 Binary files /dev/null and b/assets/icons/01n.png differ diff --git a/assets/icons/02d.png b/assets/icons/02d.png new file mode 100644 index 0000000..683b10c Binary files /dev/null and b/assets/icons/02d.png differ diff --git a/assets/icons/02n.png b/assets/icons/02n.png new file mode 100644 index 0000000..25abc66 Binary files /dev/null and b/assets/icons/02n.png differ diff --git a/assets/icons/03d.png b/assets/icons/03d.png new file mode 100644 index 0000000..683b10c Binary files /dev/null and b/assets/icons/03d.png differ diff --git a/assets/icons/03n.png b/assets/icons/03n.png new file mode 100644 index 0000000..25abc66 Binary files /dev/null and b/assets/icons/03n.png differ diff --git a/assets/icons/04d.png b/assets/icons/04d.png new file mode 100644 index 0000000..683b10c Binary files /dev/null and b/assets/icons/04d.png differ diff --git a/assets/icons/04n.png b/assets/icons/04n.png new file mode 100644 index 0000000..25abc66 Binary files /dev/null and b/assets/icons/04n.png differ diff --git a/assets/icons/09d.png b/assets/icons/09d.png new file mode 100644 index 0000000..5570f74 Binary files /dev/null and b/assets/icons/09d.png differ diff --git a/assets/icons/09n.png b/assets/icons/09n.png new file mode 100644 index 0000000..5570f74 Binary files /dev/null and b/assets/icons/09n.png differ diff --git a/assets/icons/10d.png b/assets/icons/10d.png new file mode 100644 index 0000000..4ea5af1 Binary files /dev/null and b/assets/icons/10d.png differ diff --git a/assets/icons/10n.png b/assets/icons/10n.png new file mode 100644 index 0000000..4ea5af1 Binary files /dev/null and b/assets/icons/10n.png differ diff --git a/assets/icons/13d.png b/assets/icons/13d.png new file mode 100644 index 0000000..40b821a Binary files /dev/null and b/assets/icons/13d.png differ diff --git a/assets/icons/13n.png b/assets/icons/13n.png new file mode 100644 index 0000000..40b821a Binary files /dev/null and b/assets/icons/13n.png differ diff --git a/assets/icons/50d.png b/assets/icons/50d.png new file mode 100644 index 0000000..2a913fb Binary files /dev/null and b/assets/icons/50d.png differ diff --git a/assets/icons/50n.png b/assets/icons/50n.png new file mode 100644 index 0000000..52a1dd7 Binary files /dev/null and b/assets/icons/50n.png differ diff --git a/assets/profile.png b/assets/profile.png new file mode 100644 index 0000000..1c927a4 Binary files /dev/null and b/assets/profile.png differ diff --git a/assets/sort.svg b/assets/sort.svg new file mode 100644 index 0000000..553c62b --- /dev/null +++ b/assets/sort.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + \ No newline at end of file diff --git a/assets/waves.png b/assets/waves.png new file mode 100644 index 0000000..51b50c1 Binary files /dev/null and b/assets/waves.png differ diff --git a/ios/.gitignore b/ios/.gitignore index 151026b..7a7f987 100644 --- a/ios/.gitignore +++ b/ios/.gitignore @@ -1,3 +1,4 @@ +**/dgph *.mode1v3 *.mode2v3 *.moved-aside diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 5d430f2..ae0821a 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -291,7 +291,7 @@ ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.example.contacts01; + PRODUCT_BUNDLE_IDENTIFIER = com.example.weatherApp; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; @@ -415,7 +415,7 @@ ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.example.contacts01; + PRODUCT_BUNDLE_IDENTIFIER = com.example.weatherApp; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; @@ -434,7 +434,7 @@ ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = com.example.contacts01; + PRODUCT_BUNDLE_IDENTIFIER = com.example.weatherApp; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json index d36b1fa..65b74d7 100644 --- a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json +++ b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -1,122 +1 @@ -{ - "images" : [ - { - "size" : "20x20", - "idiom" : "iphone", - "filename" : "Icon-App-20x20@2x.png", - "scale" : "2x" - }, - { - "size" : "20x20", - "idiom" : "iphone", - "filename" : "Icon-App-20x20@3x.png", - "scale" : "3x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@1x.png", - "scale" : "1x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@2x.png", - "scale" : "2x" - }, - { - "size" : "29x29", - "idiom" : "iphone", - "filename" : "Icon-App-29x29@3x.png", - "scale" : "3x" - }, - { - "size" : "40x40", - "idiom" : "iphone", - "filename" : "Icon-App-40x40@2x.png", - "scale" : "2x" - }, - { - "size" : "40x40", - "idiom" : "iphone", - "filename" : "Icon-App-40x40@3x.png", - "scale" : "3x" - }, - { - "size" : "60x60", - "idiom" : "iphone", - "filename" : "Icon-App-60x60@2x.png", - "scale" : "2x" - }, - { - "size" : "60x60", - "idiom" : "iphone", - "filename" : "Icon-App-60x60@3x.png", - "scale" : "3x" - }, - { - "size" : "20x20", - "idiom" : "ipad", - "filename" : "Icon-App-20x20@1x.png", - "scale" : "1x" - }, - { - "size" : "20x20", - "idiom" : "ipad", - "filename" : "Icon-App-20x20@2x.png", - "scale" : "2x" - }, - { - "size" : "29x29", - "idiom" : "ipad", - "filename" : "Icon-App-29x29@1x.png", - "scale" : "1x" - }, - { - "size" : "29x29", - "idiom" : "ipad", - "filename" : "Icon-App-29x29@2x.png", - "scale" : "2x" - }, - { - "size" : "40x40", - "idiom" : "ipad", - "filename" : "Icon-App-40x40@1x.png", - "scale" : "1x" - }, - { - "size" : "40x40", - "idiom" : "ipad", - "filename" : "Icon-App-40x40@2x.png", - "scale" : "2x" - }, - { - "size" : "76x76", - "idiom" : "ipad", - "filename" : "Icon-App-76x76@1x.png", - "scale" : "1x" - }, - { - "size" : "76x76", - "idiom" : "ipad", - "filename" : "Icon-App-76x76@2x.png", - "scale" : "2x" - }, - { - "size" : "83.5x83.5", - "idiom" : "ipad", - "filename" : "Icon-App-83.5x83.5@2x.png", - "scale" : "2x" - }, - { - "size" : "1024x1024", - "idiom" : "ios-marketing", - "filename" : "Icon-App-1024x1024@1x.png", - "scale" : "1x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} +{"images":[{"size":"60x60","expected-size":"180","filename":"180.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"40x40","expected-size":"80","filename":"80.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"40x40","expected-size":"120","filename":"120.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"60x60","expected-size":"120","filename":"120.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"57x57","expected-size":"57","filename":"57.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"1x"},{"size":"29x29","expected-size":"58","filename":"58.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"29x29","expected-size":"29","filename":"29.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"1x"},{"size":"29x29","expected-size":"87","filename":"87.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"57x57","expected-size":"114","filename":"114.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"20x20","expected-size":"40","filename":"40.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"20x20","expected-size":"60","filename":"60.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"1024x1024","filename":"1024.png","expected-size":"1024","idiom":"ios-marketing","folder":"Assets.xcassets/AppIcon.appiconset/","scale":"1x"},{"size":"40x40","expected-size":"80","filename":"80.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"72x72","expected-size":"72","filename":"72.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"76x76","expected-size":"152","filename":"152.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"50x50","expected-size":"100","filename":"100.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"29x29","expected-size":"58","filename":"58.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"76x76","expected-size":"76","filename":"76.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"29x29","expected-size":"29","filename":"29.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"50x50","expected-size":"50","filename":"50.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"72x72","expected-size":"144","filename":"144.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"40x40","expected-size":"40","filename":"40.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"83.5x83.5","expected-size":"167","filename":"167.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"},{"size":"20x20","expected-size":"20","filename":"20.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"1x"},{"size":"20x20","expected-size":"40","filename":"40.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"ipad","scale":"2x"}]} \ No newline at end of file diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png deleted file mode 100644 index dc9ada4..0000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png deleted file mode 100644 index 28c6bf0..0000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png deleted file mode 100644 index 2ccbfd9..0000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png deleted file mode 100644 index f091b6b..0000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png deleted file mode 100644 index 4cde121..0000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png deleted file mode 100644 index d0ef06e..0000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png deleted file mode 100644 index dcdc230..0000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png deleted file mode 100644 index 2ccbfd9..0000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png deleted file mode 100644 index c8f9ed8..0000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png deleted file mode 100644 index a6d6b86..0000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png deleted file mode 100644 index a6d6b86..0000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png deleted file mode 100644 index 75b2d16..0000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png deleted file mode 100644 index c4df70d..0000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png deleted file mode 100644 index 6a84f41..0000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png deleted file mode 100644 index d0e1f58..0000000 Binary files a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png and /dev/null differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/100.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/100.png new file mode 100644 index 0000000..a5a030b Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/100.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/1024.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/1024.png new file mode 100644 index 0000000..9ff0594 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/1024.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/114.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/114.png new file mode 100644 index 0000000..b88e760 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/114.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/120.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/120.png new file mode 100644 index 0000000..2e8f960 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/120.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/144.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/144.png new file mode 100644 index 0000000..810e557 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/144.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/152.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/152.png new file mode 100644 index 0000000..59f6c43 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/152.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/167.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/167.png new file mode 100644 index 0000000..623b602 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/167.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/180.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/180.png new file mode 100644 index 0000000..45f8797 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/180.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/20.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/20.png new file mode 100644 index 0000000..158772b Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/20.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/29.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/29.png new file mode 100644 index 0000000..4be6fe8 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/29.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/40.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/40.png new file mode 100644 index 0000000..25c7f57 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/40.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/50.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/50.png new file mode 100644 index 0000000..4066fed Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/50.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/57.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/57.png new file mode 100644 index 0000000..5fa2caa Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/57.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/58.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/58.png new file mode 100644 index 0000000..c1a5fac Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/58.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/60.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/60.png new file mode 100644 index 0000000..45efc26 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/60.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/72.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/72.png new file mode 100644 index 0000000..e3a1033 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/72.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/76.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/76.png new file mode 100644 index 0000000..4cc92cc Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/76.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/80.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/80.png new file mode 100644 index 0000000..28403e9 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/80.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/87.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/87.png new file mode 100644 index 0000000..3dd1f16 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/87.png differ diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist index e2eed25..9e5eaf2 100644 --- a/ios/Runner/Info.plist +++ b/ios/Runner/Info.plist @@ -11,7 +11,7 @@ CFBundleInfoDictionaryVersion 6.0 CFBundleName - contacts_01 + weather_app CFBundlePackageType APPL CFBundleShortVersionString diff --git a/lib/cityDropDown.dart b/lib/cityDropDown.dart new file mode 100644 index 0000000..08d6497 --- /dev/null +++ b/lib/cityDropDown.dart @@ -0,0 +1,134 @@ +import 'models/location.dart'; +import 'package:flutter/material.dart'; +import 'extensions.dart'; + +class CityDropDown extends StatefulWidget { + final List locations; + const CityDropDown(this.locations); + + @override + _CityDropDownState createState() => + _CityDropDownState(this.locations); +} + +class _CityDropDownState extends State { + final List locations; + final Location location; + _CityDropDownState(List locations) + : this.locations = locations, + this.location = locations[0]; + + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: Colors.grey[100], + body: createAppBar(this.locations, this.location, context) + + ); + } + + +Widget createAppBar( + List locations, Location location, BuildContext context) { + return GestureDetector( + onTap: () { + showModalBottomSheet( + context: context, + builder: (BuildContext context) { + return Container( + child: Column(children: [ + Icon( + Icons.keyboard_arrow_down_rounded, + color: Colors.black, + size: 24.0, + semanticLabel: 'Tap to change location', + ), + Expanded( + child: ListView.builder( + padding: const EdgeInsets.all(8), + itemCount: locations.length, + itemBuilder: (BuildContext context, int index) { + return GestureDetector( + onTap: () { + setState(() { + + }); + Navigator.pop(context); + }, + child: Column( + children: [ + Container( + height: 50, + child: Center( + child: Text.rich( + TextSpan( + children: [ + TextSpan( + text: + '${locations[index].city.capitalizeFirstOfEach}, ', + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 16)), + TextSpan( + text: + '${locations[index].country.capitalizeFirstOfEach}', + style: TextStyle( + fontWeight: FontWeight.normal, + fontSize: 16)), + ], + ), + ), + ), + ), + Divider(), + ], + )); + })), + ])); + }, + ); + }, + child: Container( + padding: + const EdgeInsets.only(left: 20, top: 15, bottom: 15, right: 20), + margin: const EdgeInsets.only( + top: 35, left: 15.0, bottom: 15.0, right: 15.0), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.all(Radius.circular(60)), + boxShadow: [ + BoxShadow( + color: Colors.grey.withOpacity(0.1), + spreadRadius: 5, + blurRadius: 7, + offset: Offset(0, 3), // changes position of shadow + ) + ]), + child: Row( + mainAxisSize: MainAxisSize.min, + children: [ + Text.rich( + TextSpan( + children: [ + TextSpan( + text: '${location.city.capitalizeFirstOfEach}, ', + style: + TextStyle(fontWeight: FontWeight.bold, fontSize: 16)), + TextSpan( + text: '${location.country.capitalizeFirstOfEach}', + style: TextStyle( + fontWeight: FontWeight.normal, fontSize: 16)), + ], + ), + ), + Icon( + Icons.keyboard_arrow_down_rounded, + color: Colors.black, + size: 24.0, + semanticLabel: 'Tap to change location', + ), + ], + )), + ); + } +} \ No newline at end of file diff --git a/lib/currentWeather.dart b/lib/currentWeather.dart new file mode 100644 index 0000000..0961c86 --- /dev/null +++ b/lib/currentWeather.dart @@ -0,0 +1,483 @@ +import 'models/forcast.dart'; +import 'models/location.dart'; +import 'models/weather.dart'; +import 'package:flutter/material.dart'; +import 'package:http/http.dart' as http; +import 'dart:convert'; +import 'extensions.dart'; +import 'package:intl/intl.dart'; + +class CurrentWeatherPage extends StatefulWidget { + final List locations; + final BuildContext context; + const CurrentWeatherPage(this.locations, this.context); + + @override + _CurrentWeatherPageState createState() => + _CurrentWeatherPageState(this.locations, this.context); +} + +class _CurrentWeatherPageState extends State { + final List locations; + final Location location; + final BuildContext context; + _CurrentWeatherPageState(List locations, BuildContext context) + : this.locations = locations, + this.context = context, + this.location = locations[0]; + + @override + Widget build(BuildContext context) { + return Scaffold( + backgroundColor: Colors.grey[100], + body: ListView(children: [ + currentWeatherViews(this.locations, this.location, this.context), + forcastViewsHourly(this.location), + forcastViewsDaily(this.location), + ])); + } +} + +Widget currentWeatherViews( + List locations, Location location, BuildContext context) { + Weather _weather; + + return FutureBuilder( + builder: (context, snapshot) { + if (snapshot.hasData) { + _weather = snapshot.data; + if (_weather == null) { + return Text("Error getting weather"); + } else { + return Column(children: [ + createAppBar(locations, location, context), + weatherBox(_weather), + weatherDetailsBox(_weather), + ]); + } + } else { + return Center(child: CircularProgressIndicator()); + } + }, + future: getCurrentWeather(location), + ); +} + +Widget forcastViewsHourly(Location location) { + Forecast _forcast; + + return FutureBuilder( + builder: (context, snapshot) { + if (snapshot.hasData) { + _forcast = snapshot.data; + if (_forcast == null) { + return Text("Error getting weather"); + } else { + return hourlyBoxes(_forcast); + } + } else { + return Center(child: CircularProgressIndicator()); + } + }, + future: getForecast(location), + ); +} + +Widget forcastViewsDaily(Location location) { + Forecast _forcast; + + return FutureBuilder( + builder: (context, snapshot) { + if (snapshot.hasData) { + _forcast = snapshot.data; + if (_forcast == null) { + return Text("Error getting weather"); + } else { + return dailyBoxes(_forcast); + } + } else { + return Center(child: CircularProgressIndicator()); + } + }, + future: getForecast(location), + ); +} + +Widget createAppBar( + List locations, Location location, BuildContext context) { + return Container( + padding: const EdgeInsets.only(left: 20, top: 15, bottom: 15, right: 20), + margin: + const EdgeInsets.only(top: 35, left: 15.0, bottom: 15.0, right: 15.0), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.all(Radius.circular(60)), + boxShadow: [ + BoxShadow( + color: Colors.grey.withOpacity(0.1), + spreadRadius: 5, + blurRadius: 7, + offset: Offset(0, 3), + ) + ]), + child: Row( + mainAxisSize: MainAxisSize.min, + children: [ + Text.rich( + TextSpan( + children: [ + TextSpan( + text: '${location.city.capitalizeFirstOfEach}, ', + style: + TextStyle(fontWeight: FontWeight.bold, fontSize: 16)), + TextSpan( + text: '${location.country.capitalizeFirstOfEach}', + style: + TextStyle(fontWeight: FontWeight.normal, fontSize: 16)), + ], + ), + ), + Icon( + Icons.keyboard_arrow_down_rounded, + color: Colors.black, + size: 24.0, + semanticLabel: 'Tap to change location', + ), + ], + )); +} + +Widget weatherDetailsBox(Weather _weather) { + return Container( + padding: const EdgeInsets.only(left: 15, top: 25, bottom: 25, right: 15), + margin: const EdgeInsets.only(left: 15, top: 5, bottom: 15, right: 15), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.all(Radius.circular(20)), + boxShadow: [ + BoxShadow( + color: Colors.grey.withOpacity(0.1), + spreadRadius: 5, + blurRadius: 7, + offset: Offset(0, 3), + ) + ]), + child: Row( + children: [ + Expanded( + child: Column( + children: [ + Container( + child: Text( + "Wind", + textAlign: TextAlign.left, + style: TextStyle( + fontWeight: FontWeight.w600, + fontSize: 12, + color: Colors.grey), + )), + Container( + child: Text( + "${_weather.wind} km/h", + textAlign: TextAlign.left, + style: TextStyle( + fontWeight: FontWeight.w700, + fontSize: 15, + color: Colors.black), + )) + ], + )), + Expanded( + child: Column( + children: [ + Container( + child: Text( + "Humidity", + textAlign: TextAlign.left, + style: TextStyle( + fontWeight: FontWeight.w600, + fontSize: 12, + color: Colors.grey), + )), + Container( + child: Text( + "${_weather.humidity.toInt()}%", + textAlign: TextAlign.left, + style: TextStyle( + fontWeight: FontWeight.w700, + fontSize: 15, + color: Colors.black), + )) + ], + )), + Expanded( + child: Column( + children: [ + Container( + child: Text( + "Pressure", + textAlign: TextAlign.left, + style: TextStyle( + fontWeight: FontWeight.w600, + fontSize: 12, + color: Colors.grey), + )), + Container( + child: Text( + "${_weather.pressure} hPa", + textAlign: TextAlign.left, + style: TextStyle( + fontWeight: FontWeight.w700, + fontSize: 15, + color: Colors.black), + )) + ], + )) + ], + ), + ); +} + +Widget weatherBox(Weather _weather) { + return Stack(children: [ + Container( + padding: const EdgeInsets.all(15.0), + margin: const EdgeInsets.all(15.0), + height: 160.0, + decoration: BoxDecoration( + color: Colors.indigoAccent, + borderRadius: BorderRadius.all(Radius.circular(20))), + ), + ClipPath( + clipper: Clipper(), + child: Container( + padding: const EdgeInsets.all(15.0), + margin: const EdgeInsets.all(15.0), + height: 160.0, + decoration: BoxDecoration( + color: Colors.indigoAccent[400], + borderRadius: BorderRadius.all(Radius.circular(20))))), + Container( + padding: const EdgeInsets.all(15.0), + margin: const EdgeInsets.all(15.0), + height: 160.0, + decoration: + BoxDecoration(borderRadius: BorderRadius.all(Radius.circular(20))), + child: Row( + children: [ + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + mainAxisSize: MainAxisSize.min, + children: [ + getWeatherIcon(_weather.icon), + Container( + margin: const EdgeInsets.all(5.0), + child: Text( + "${_weather.description.capitalizeFirstOfEach}", + style: TextStyle( + fontWeight: FontWeight.normal, + fontSize: 16, + color: Colors.white), + )), + Container( + margin: const EdgeInsets.all(5.0), + child: Text( + "H:${_weather.high.toInt()}° L:${_weather.low.toInt()}°", + textAlign: TextAlign.left, + style: TextStyle( + fontWeight: FontWeight.normal, + fontSize: 13, + color: Colors.white), + )), + ])), + Column(children: [ + Container( + child: Text( + "${_weather.temp.toInt()}°", + textAlign: TextAlign.left, + style: TextStyle( + fontWeight: FontWeight.bold, + fontSize: 60, + color: Colors.white), + )), + Container( + margin: const EdgeInsets.all(0), + child: Text( + "Feels like ${_weather.feelsLike.toInt()}°", + textAlign: TextAlign.left, + style: TextStyle( + fontWeight: FontWeight.normal, + fontSize: 13, + color: Colors.white), + )), + ]) + ], + )) + ]); +} + +Image getWeatherIcon(String _icon) { + String path = 'assets/icons/'; + String imageExtension = ".png"; + return Image.asset( + path + _icon + imageExtension, + width: 70, + height: 70, + ); +} + +Image getWeatherIconSmall(String _icon) { + String path = 'assets/icons/'; + String imageExtension = ".png"; + return Image.asset( + path + _icon + imageExtension, + width: 40, + height: 40, + ); +} + +Widget hourlyBoxes(Forecast _forecast) { + return Container( + margin: EdgeInsets.symmetric(vertical: 0.0), + height: 150.0, + child: ListView.builder( + padding: const EdgeInsets.only(left: 8, top: 0, bottom: 0, right: 8), + scrollDirection: Axis.horizontal, + itemCount: _forecast.hourly.length, + itemBuilder: (BuildContext context, int index) { + return Container( + padding: const EdgeInsets.only( + left: 10, top: 15, bottom: 15, right: 10), + margin: const EdgeInsets.all(5), + decoration: BoxDecoration( + color: Colors.white, + borderRadius: BorderRadius.all(Radius.circular(18)), + boxShadow: [ + BoxShadow( + color: Colors.grey.withOpacity(0.1), + spreadRadius: 2, + blurRadius: 2, + offset: Offset(0, 1), // changes position of shadow + ) + ]), + child: Column(children: [ + Text( + "${_forecast.hourly[index].temp}°", + style: TextStyle( + fontWeight: FontWeight.w500, + fontSize: 17, + color: Colors.black), + ), + getWeatherIcon(_forecast.hourly[index].icon), + Text( + "${getTimeFromTimestamp(_forecast.hourly[index].dt)}", + style: TextStyle( + fontWeight: FontWeight.w600, + fontSize: 12, + color: Colors.grey), + ), + ])); + })); +} + +String getTimeFromTimestamp(int timestamp) { + var date = new DateTime.fromMillisecondsSinceEpoch(timestamp * 1000); + var formatter = new DateFormat('h:mm a'); + return formatter.format(date); +} + +String getDateFromTimestamp(int timestamp) { + var date = new DateTime.fromMillisecondsSinceEpoch(timestamp * 1000); + var formatter = new DateFormat('E'); + return formatter.format(date); +} + +Widget dailyBoxes(Forecast _forcast) { + return Expanded( + child: ListView.builder( + shrinkWrap: true, + physics: ClampingScrollPhysics(), + padding: const EdgeInsets.only(left: 8, top: 0, bottom: 0, right: 8), + itemCount: _forcast.daily.length, + itemBuilder: (BuildContext context, int index) { + return Container( + padding: const EdgeInsets.only( + left: 10, top: 5, bottom: 5, right: 10), + margin: const EdgeInsets.all(5), + child: Row(children: [ + Expanded( + child: Text( + "${getDateFromTimestamp(_forcast.daily[index].dt)}", + style: TextStyle(fontSize: 14, color: Colors.black), + )), + Expanded( + child: getWeatherIconSmall(_forcast.daily[index].icon)), + Expanded( + child: Text( + "${_forcast.daily[index].high.toInt()}/${_forcast.daily[index].low.toInt()}", + textAlign: TextAlign.right, + style: TextStyle(fontSize: 14, color: Colors.grey), + )), + ])); + })); +} + +class Clipper extends CustomClipper { + @override + Path getClip(Size size) { + Path path = Path(); + path.moveTo(0, size.height - 20); + + path.quadraticBezierTo((size.width / 6) * 1, (size.height / 2) + 15, + (size.width / 3) * 1, size.height - 30); + path.quadraticBezierTo((size.width / 2) * 1, (size.height + 0), + (size.width / 3) * 2, (size.height / 4) * 3); + path.quadraticBezierTo((size.width / 6) * 5, (size.height / 2) - 20, + size.width, size.height - 60); + + path.lineTo(size.width, size.height - 60); + path.lineTo(size.width, size.height); + path.lineTo(0, size.height); + + path.close(); + + return path; + } + + @override + bool shouldReclip(Clipper oldClipper) => false; +} + +Future getCurrentWeather(Location location) async { + Weather weather; + String city = location.city; + String apiKey = "4766c823f0f5c959d5144bc5a3e395b2"; + var url = + "https://api.openweathermap.org/data/2.5/weather?q=$city&appid=$apiKey&units=metric"; + + final response = await http.get(url); + + if (response.statusCode == 200) { + weather = Weather.fromJson(jsonDecode(response.body)); + } + + return weather; +} + +Future getForecast(Location location) async { + Forecast forecast; + String apiKey = "4766c823f0f5c959d5144bc5a3e395b2"; + String lat = location.lat; + String lon = location.lon; + var url = + "https://api.openweathermap.org/data/2.5/onecall?lat=$lat&lon=$lon&appid=$apiKey&units=metric"; + + final response = await http.get(url); + + if (response.statusCode == 200) { + forecast = Forecast.fromJson(jsonDecode(response.body)); + } + + return forecast; +} diff --git a/lib/extensions.dart b/lib/extensions.dart new file mode 100644 index 0000000..61b81fc --- /dev/null +++ b/lib/extensions.dart @@ -0,0 +1,5 @@ +extension StringExtension on String { + String get inCaps => '${this[0].toUpperCase()}${this.substring(1)}'; + String get allInCaps => this.toUpperCase(); + String get capitalizeFirstOfEach => this.split(" ").map((str) => str.inCaps).join(" "); +} \ No newline at end of file diff --git a/lib/main.dart b/lib/main.dart index 2c084ed..497cf4c 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,255 +1,28 @@ +import 'currentWeather.dart'; import 'package:flutter/material.dart'; -import 'dart:math' as math; -void main() { - runApp(const MyApp()); -} +import 'models/location.dart'; -class Contact { - String image; - String name; - String mobileNumber; - DateTime date; - bool isIncoming; - Contact(this.image, this.name, this.mobileNumber, this.date, this.isIncoming); +void main() { + runApp(MyApp()); } class MyApp extends StatelessWidget { - const MyApp({Key? key}) : super(key: key); + List locations = [ + new Location( + city: "Baghdad", country: "Iraq", lat: "33.3406", lon: "44.4009") + ]; @override Widget build(BuildContext context) { return MaterialApp( - title: 'Flutter Demo 2', - theme: ThemeData( - primarySwatch: Colors.blue, - ), debugShowCheckedModeBanner: false, - home: const MyHomePage(title: 'Contacts App'), - ); - } -} - -class MyHomePage extends StatefulWidget { - const MyHomePage({Key? key, required this.title}) : super(key: key); - - final String title; - - @override - State createState() => _MyHomePageState(); -} - -class _MyHomePageState extends State { - int _selectedIndex = 2; - static const TextStyle optionStyle = - TextStyle(fontSize: 30, fontWeight: FontWeight.bold); - static late List _pages; - - _MyHomePageState() { - _pages = [ - buildContactsList(), - buildFavoritesGridView(), - // Text('hello'), - Text( - 'Index 2: School', - style: optionStyle, - ), - ]; - } - - void _onItemTapped(int index) { - setState(() { - _selectedIndex = index; - }); - } - - var contacts = [ - Contact( - 'https://i.pravatar.cc/300', - 'Ahmed', - '71766137347', - DateTime.now().add( - const Duration(seconds: 3), - ), - true, - ), - Contact( - 'https://i.pravatar.cc/301', - 'Ali', - '71766137347', - DateTime.now().add( - const Duration(days: 1), - ), - false, - ), - Contact( - 'https://i.pravatar.cc/302', - 'Kamal', - '71766137347', - DateTime.now().add( - const Duration(days: 3), - ), - true, - ), - Contact( - 'https://i.pravatar.cc/303', - 'Mohammad', - '71766137347', - DateTime.now().add( - const Duration(days: 5), - ), - true, - ), - Contact( - 'https://i.pravatar.cc/304', - 'Mohammad', - '71766137347', - DateTime.now().add( - const Duration(days: 5), - ), - false, - ), - Contact( - 'https://i.pravatar.cc/305', - 'Hussein', - '71766137347', - DateTime.now().add( - const Duration(days: 6), - ), - false, - ), - Contact( - 'https://i.pravatar.cc/306', - 'Aboud', - '71766137347', - DateTime.now().add( - const Duration(days: 7), - ), - false, - ), - Contact( - 'https://i.pravatar.cc/307', - 'Osama', - '71766137347', - DateTime.now().add( - const Duration(days: 6), - ), - false, - ), - ]; - - Widget buildFavoritesGridView() { - return Column( - children: [ - Text('Favorites'), - Divider(thickness: 4,), - Expanded( - child: GridView.count( - crossAxisCount: 3, - children: List.generate(5, (index) { - var personColor = Color((math.Random().nextDouble() * 0xFFFFFF).toInt()) - .withOpacity(1.0); - return Center( - child: Container( - width: 120, - height: 120, - child: Text( - contacts[index].name[0], - style: TextStyle(fontSize: 40), - ), - alignment: Alignment.center, - decoration: - BoxDecoration(shape: BoxShape.circle, color: personColor), - ), - ); - }), - ), - ), - ], - ); - } - - Widget buildContactItem(Contact _contact) { - return Card( - child: Padding( - padding: const EdgeInsets.all(8.0), - child: Row( - children: [ - CircleAvatar( - backgroundImage: NetworkImage(_contact.image), - ), - Padding( - padding: const EdgeInsets.all(16), - child: Column( - mainAxisAlignment: MainAxisAlignment.start, - crossAxisAlignment: CrossAxisAlignment.start, - children: [ - Text( - _contact.name, - style: const TextStyle(fontWeight: FontWeight.bold), - ), - Text(_contact.mobileNumber), - ], - ), - ), - Text(_contact.date.toIso8601String().split('T').first), - Expanded( - child: Container(), - ), - if (_contact.isIncoming) - Icon( - Icons.arrow_downward, - color: Colors.red, - ) - else - Icon( - Icons.arrow_upward, - color: Colors.green, - ) - ], - ), - ), - ); - } - - Widget buildContactsList() { - return ListView.builder( - itemBuilder: (_context, index) { - return buildContactItem(contacts[index]); - }, - itemCount: contacts.length, - ); - } - - @override - Widget build(BuildContext context) { - return Scaffold( - appBar: AppBar( - title: Text(widget.title), - ), - body: Center( - child: _pages[_selectedIndex], - ), - bottomNavigationBar: BottomNavigationBar( - items: const [ - BottomNavigationBarItem( - icon: Icon(Icons.home), - label: 'Recent', - ), - BottomNavigationBarItem( - icon: Icon(Icons.favorite), - label: 'Favorites', - ), - BottomNavigationBarItem( - icon: Icon(Icons.access_time_outlined), - label: 'School', - activeIcon: Icon(Icons.access_time_filled) - ), - ], - currentIndex: _selectedIndex, - selectedItemColor: Colors.amber[800], - onTap: _onItemTapped, + title: 'BgWeather', + theme: ThemeData( + primarySwatch: Colors.lightBlue, + visualDensity: VisualDensity.adaptivePlatformDensity, ), + home: CurrentWeatherPage(locations, context), ); } } diff --git a/lib/models/daily.dart b/lib/models/daily.dart new file mode 100644 index 0000000..85d264c --- /dev/null +++ b/lib/models/daily.dart @@ -0,0 +1,29 @@ +class Daily { + final int dt; + final double temp; + final double feelsLike; + final double low; + final double high; + final String description; + final double pressure; + final double humidity; + final double wind; + final String icon; + + Daily({this.dt, this.temp, this.feelsLike, this.low, this.high, this.description, this.pressure, this.humidity, this.wind, this.icon}); + + factory Daily.fromJson(Map json) { + return Daily( + dt: json['dt'].toInt(), + temp: json['temp']['day'].toDouble(), + feelsLike: json['feels_like']['day'].toDouble(), + low: json['temp']['min'].toDouble(), + high: json['temp']['max'].toDouble(), + description: json['weather'][0]['description'], + pressure: json['pressure'].toDouble(), + humidity: json['humidity'].toDouble(), + wind: json['wind_speed'].toDouble(), + icon: json['weather'][0]['icon'], + ); + } +} \ No newline at end of file diff --git a/lib/models/forcast.dart b/lib/models/forcast.dart new file mode 100644 index 0000000..1191db2 --- /dev/null +++ b/lib/models/forcast.dart @@ -0,0 +1,35 @@ + +import 'daily.dart'; +import 'hourly.dart'; + +class Forecast { + final List hourly; + final List daily; + + Forecast({this.hourly, this.daily}); + + factory Forecast.fromJson(Map json) { + List hourlyData = json['hourly']; + List dailyData = json['daily']; + + // ignore: deprecated_member_use + List hourly = List(); + // ignore: deprecated_member_use + List daily = List(); + + hourlyData.forEach((item) { + var hour = Hourly.fromJson(item); + hourly.add(hour); + }); + + dailyData.forEach((item) { + var day = Daily.fromJson(item); + daily.add(day); + }); + + return Forecast( + hourly: hourly, + daily: daily + ); + } +} \ No newline at end of file diff --git a/lib/models/hourly.dart b/lib/models/hourly.dart new file mode 100644 index 0000000..0c42eeb --- /dev/null +++ b/lib/models/hourly.dart @@ -0,0 +1,30 @@ +class Hourly { + final int dt; + final double temp; + final double feelsLike; + final double pressure; + final double dewPoint; + final double uvi; + final double visibility; + final double wind; + final String description; + final String icon; + + Hourly({this.dt, this.temp, this.feelsLike, this.pressure, this.dewPoint, this.uvi, this.visibility, this.wind, this.description, this.icon}); + + factory Hourly.fromJson(Map json) { + + return Hourly( + dt: json['dt'].toInt(), + temp: json['temp'].toDouble(), + feelsLike: json['feels_like'].toDouble(), + pressure: json['pressure'].toDouble(), + dewPoint: json['dew_point'].toDouble(), + uvi: json['uvi'].toDouble(), + visibility: json['visibility'].toDouble(), + wind: json['wind_speed'].toDouble(), + description: json['weather'][0]['description'], + icon: json['weather'][0]['icon'], + ); + } +} \ No newline at end of file diff --git a/lib/models/location.dart b/lib/models/location.dart new file mode 100644 index 0000000..68ea871 --- /dev/null +++ b/lib/models/location.dart @@ -0,0 +1,10 @@ +class Location { + final String city; + final String country; + final String lat; + final String lon; + + Location({this.city, this.country, this.lat, this.lon}); + + +} \ No newline at end of file diff --git a/lib/models/weather.dart b/lib/models/weather.dart new file mode 100644 index 0000000..250010b --- /dev/null +++ b/lib/models/weather.dart @@ -0,0 +1,45 @@ + +class Weather { + final double temp; + final double feelsLike; + final double low; + final double high; + final String description; + final double pressure; + final double humidity; + final double wind; + final String icon; + + Weather({this.temp, this.feelsLike, this.low, this.high, this.description, this.pressure, this.humidity, this.wind, this.icon}); + + factory Weather.fromJson(Map json) { + print(json); + return Weather( + temp: json['main']['temp'].toDouble(), + feelsLike: json['main']['feels_like'].toDouble(), + low: json['main']['temp_min'].toDouble(), + high: json['main']['temp_max'].toDouble(), + description: json['weather'][0]['description'], + pressure: json['main']['pressure'].toDouble(), + humidity: json['main']['humidity'].toDouble(), + wind: json['wind']['speed'].toDouble(), + icon: json['weather'][0]['icon'], + ); + } +} + +// { +// coord: {lon: -114.0853, lat: 51.0501}, +// weather: [{id: 803, main: Clouds, description: broken clouds, icon: 04d}], +// base: stations, +// main: {temp: 14.56, feels_like: 12.54, temp_min: 12.78, temp_max: 16, pressure: 1000, humidity: 18}, +// visibility: 10000, +// wind: {speed: 8.75, deg: 290, gust: 14.92}, +// clouds: {all: 75}, +// dt: 1617831827, +// sys: {type: 1, id: 989, country: CA, sunrise: 1617800260, sunset: 1617848317}, +// timezone: -21600, +// id: 5913490, +// name: Calgary, +// cod: 200 +// } \ No newline at end of file diff --git a/lib/task 2 cars reting/car_details.dart b/lib/task 2 cars reting/car_details.dart new file mode 100644 index 0000000..052c13c --- /dev/null +++ b/lib/task 2 cars reting/car_details.dart @@ -0,0 +1,396 @@ +// import 'package:flutter/material.dart'; +// import 'main.dart'; +// +// class CarDetailsView extends StatefulWidget { +// const CarDetailsView({Key? key, required this.car}) : super(key: key); +// final Car car; +// @override +// _CarDetailsViewState createState() => _CarDetailsViewState(); +// } +// +// class _CarDetailsViewState extends State { +// @override +// Widget build(BuildContext context) { +// Size size = MediaQuery.of(context).size; +// return Scaffold( +// backgroundColor: Colors.blueGrey.shade50, +// body: Stack( +// children: [ +// Positioned( +// width: size.width, +// height: size.height * 0.3, +// top: 0, +// right: 0, +// child: ClipRRect( +// borderRadius: const BorderRadius.only( +// bottomLeft: Radius.circular(30), +// bottomRight: Radius.circular(30)), +// child: Image.asset( +// 'assets/waves.png', +// width: size.width, +// fit: BoxFit.fill, +// ), +// ), +// ), +// Positioned( +// width: size.width * 0.9, +// height: size.height * 0.4, +// top: size.height * 0.2, +// right: size.width * .05, +// child: Container( +// decoration: BoxDecoration( +// color: Colors.white, +// borderRadius: BorderRadius.circular(50), +// boxShadow: [ +// BoxShadow( +// color: Colors.grey.withOpacity(0.2), +// blurRadius: 20, +// spreadRadius: 0, +// offset: const Offset(5, 5)) +// ], +// ), +// child: Column( +// crossAxisAlignment: CrossAxisAlignment.center, +// children: [ +// SizedBox( +// height: size.height * .13, +// ), +// Text( +// widget.car.name, +// style: const TextStyle( +// color: Colors.black87, +// fontSize: 25, +// fontWeight: FontWeight.w800), +// ), +// SizedBox( +// height: size.height * .02, +// ), +// const Text( +// '4 doors | Sport Package', +// style: TextStyle(color: Colors.grey, fontSize: 18), +// ), +// SizedBox( +// height: size.height * .02, +// ), +// Row( +// mainAxisAlignment: MainAxisAlignment.center, +// children: const [ +// Icon( +// Icons.star, +// color: Colors.amberAccent, +// size: 15, +// ), +// Icon( +// Icons.star, +// color: Colors.amberAccent, +// size: 15, +// ), +// Icon( +// Icons.star, +// color: Colors.amberAccent, +// size: 15, +// ), +// Icon( +// Icons.star, +// color: Colors.amberAccent, +// size: 15, +// ), +// Icon( +// Icons.star_outline, +// color: Colors.amberAccent, +// size: 15, +// ), +// Text( +// '(23.5k)', +// style: TextStyle(color: Colors.grey, fontSize: 14, fontWeight: FontWeight.bold), +// ), +// ], +// ), +// SizedBox( +// height: size.height * .02, +// ), +// Row( +// mainAxisAlignment: MainAxisAlignment.spaceEvenly, +// children: [ +// Column( +// children: const [ +// Icon( +// Icons.flash_auto_outlined, +// color: Colors.black87, +// ), +// Text('Automatic', style: TextStyle(color: Colors.black54),), +// ], +// ), +// Column( +// children: const [ +// Icon( +// Icons.ac_unit, +// color: Colors.black87, +// ), +// Text('Air Con', style: TextStyle(color: Colors.black54)), +// ], +// ), +// Column( +// children: const [ +// Icon( +// Icons.person, +// color: Colors.black87, +// ), +// Text('5 Seater', style: TextStyle(color: Colors.black54)), +// ], +// ), +// ], +// ) +// ], +// ), +// ), +// ), +// Positioned( +// width: size.width * 0.7, +// height: size.height * 0.3, +// top: size.height * 0.06, +// right: size.width * .15, +// child: Image.asset(widget.car.image)), +// Positioned( +// top: size.height * 0.04, +// left: size.height * 0.02, +// width: 30, +// height: 30, +// child: IconButton( +// onPressed: () { +// Navigator.pop(context); +// }, +// icon: const Icon( +// Icons.arrow_back_ios, +// color: Colors.white, +// ))), +// Positioned( +// top: size.height * 0.63, +// left: size.height * 0.03, +// width: size.width * 0.88, +// height: size.height * 0.37, +// child: Column( +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// const Text( +// 'Trip Dates', +// style: TextStyle( +// color: Colors.black87, +// fontSize: 1, +// fontWeight: FontWeight.w800), +// ), +// const SizedBox(height: 5), +// Row( +// children: [ +// Expanded( +// child: ClipPath( +// clipper: MyCustomClipper(), +// child: Container( +// width: size.width * 0.75, +// padding: const EdgeInsets.symmetric( +// horizontal: 15, vertical: 10), +// decoration: BoxDecoration( +// color: Colors.white, +// borderRadius: const BorderRadius.only( +// topLeft: Radius.circular(20), +// bottomLeft: Radius.circular(20)), +// boxShadow: [ +// BoxShadow( +// color: Colors.grey.withOpacity(0.3), +// blurRadius: 20, +// spreadRadius: 0, +// offset: const Offset(5, 5)) +// ], +// ), +// child: Row(children: [ +// Container( +// width: 40, +// height: 40, +// decoration: BoxDecoration( +// borderRadius: BorderRadius.circular(15), +// color: const Color(0xfff26cab)), +// child: const Icon( +// Icons.date_range_outlined, +// color: Colors.white, +// )), +// +// const Padding( +// padding: EdgeInsets.all(8.0), +// child: Text( +// '03-07-2020 - 05-07-2020', +// style: TextStyle( +// color: Colors.black87, +// fontSize: 13, +// fontWeight: FontWeight.w600), +// ), +// ), +// ]), +// ), +// ), +// ), +// Container( +// width: 50, +// height: 50, +// decoration: BoxDecoration( +// borderRadius: BorderRadius.circular(20), +// color: const Color(0xff2156c0)), +// child: const Icon( +// Icons.double_arrow_rounded, +// color: Colors.white, +// ), +// ) +// ], +// ), +// const SizedBox(height: 10), +// const Text( +// 'Pickup & Return', +// style: TextStyle( +// color: Colors.black87, +// fontSize: 21, +// fontWeight: FontWeight.w800), +// ), +// const SizedBox(height: 10), +// Row( +// children: [ +// Expanded( +// child: ClipPath( +// clipper: MyCustomClipper(), +// child: Container( +// width: size.width * 0.75, +// padding: const EdgeInsets.symmetric( +// horizontal: 15, vertical: 10), +// decoration: BoxDecoration( +// color: Colors.white, +// borderRadius: const BorderRadius.only( +// topLeft: Radius.circular(20), +// bottomLeft: Radius.circular(20)), +// boxShadow: [ +// BoxShadow( +// color: Colors.grey.withOpacity(0.2), +// blurRadius: 20, +// spreadRadius: 0, +// offset: const Offset(5, 5)) +// ], +// ), +// child: Row(children: [ +// Container( +// width: 40, +// height: 40, +// decoration: BoxDecoration( +// borderRadius: BorderRadius.circular(15), +// color: const Color(0xfff26cab)), +// child: const Icon( +// Icons.location_on, +// color: Colors.white, +// )), +// const Text( +// ' Miami, 786 FL', +// style: TextStyle( +// color: Colors.black87, +// fontSize: 16, +// fontWeight: FontWeight.w600), +// ), +// ]), +// ), +// ), +// ), +// Container( +// width: 50, +// height: 50, +// decoration: BoxDecoration( +// borderRadius: BorderRadius.circular(20), +// color: const Color(0xff2156c0)), +// child: const Icon( +// Icons.double_arrow_rounded, +// color: Colors.white, +// ), +// ) +// ], +// ), +// ], +// )), +// Positioned( +// top: size.height * 0.91, +// left: 0, +// width: size.width, +// height: size.height * 0.09, +// child: Container( +// width: size.width, +// decoration: BoxDecoration( +// color: Colors.white, +// borderRadius: const BorderRadius.only( +// topLeft: Radius.circular(40), +// topRight: Radius.circular(40)), +// boxShadow: [ +// BoxShadow( +// color: Colors.grey.withOpacity(0.2), +// blurRadius: 20, +// spreadRadius: 0, +// offset: const Offset(5, 5)) +// ], +// ), +// child: Padding( +// padding: const EdgeInsets.only( +// top: 10, left: 20, right: 20, bottom: 5), +// child: Row( +// crossAxisAlignment: CrossAxisAlignment.center, +// mainAxisAlignment: MainAxisAlignment.spaceBetween, +// children: [ +// Expanded( +// child: Column( +// crossAxisAlignment: CrossAxisAlignment.start, +// mainAxisAlignment: MainAxisAlignment.center, +// children: [ +// const Text( +// 'Total', +// style: TextStyle(color: Colors.grey, fontSize: 16), +// ), +// Expanded( +// child: Text( +// '${widget.car.price} / trip', +// style: const TextStyle( +// color: Colors.black87, +// fontSize: 18, +// fontWeight: FontWeight.w800), +// ), +// ), +// ], +// ), +// ), +// ElevatedButton( +// style: ElevatedButton.styleFrom( +// elevation: 0, +// primary: Colors.redAccent, +// shape: const StadiumBorder()), +// onPressed: () {}, +// child: const Text('Go to Checkout'), +// ), +// ], +// ), +// ), +// )), +// ], +// ), +// ); +// } +// } +// +// class MyCustomClipper extends CustomClipper { +// @override +// Path getClip(Size size) { +// var path = Path(); +// path.moveTo(0, 0); +// path.lineTo(0, size.height); +// path.lineTo(size.width + 80, size.height); +// path.quadraticBezierTo(size.width / 1.15, size.height * 1.45, +// size.width / 1.013, size.height * 0.035); +// path.lineTo(size.width, 0); +// return path; +// } +// +// @override +// bool shouldReclip(covariant CustomClipper oldClipper) { +// return true; +// } +// } +// diff --git a/lib/task 2 cars reting/first_page.dart b/lib/task 2 cars reting/first_page.dart new file mode 100644 index 0000000..0fb85ff --- /dev/null +++ b/lib/task 2 cars reting/first_page.dart @@ -0,0 +1,274 @@ +// import 'package:flutter/material.dart'; +// import 'package:flutter_svg/flutter_svg.dart'; +// import 'car_details.dart'; +// import 'main.dart'; +// +// class MyAppBar extends StatelessWidget { +// const MyAppBar({Key? key}) : super(key: key); +// +// @override +// Widget build(BuildContext context) { +// Size size = MediaQuery.of(context).size; +// return Stack( +// children: [ +// ClipRRect( +// borderRadius: const BorderRadius.only( +// bottomLeft: Radius.circular(30), +// bottomRight: Radius.circular(30)), +// child: Image.asset( +// 'assets/waves.png', +// width: size.width, +// fit: BoxFit.fill, +// ), +// ), +// Positioned( +// height: 50, +// width: size.width * 0.9, +// left: size.width * 0.05, +// top: 27, +// child: Row( +// mainAxisAlignment: MainAxisAlignment.spaceBetween, +// children: [ +// SvgPicture.asset( +// 'assets/sort.svg', +// width: 30, +// ), +// Image.asset( +// 'assets/profile.png', +// width: 40, +// ) +// ], +// )), +// Positioned( +// height: 30, +// left: size.width * 0.05, +// top: size.height * 0.12, +// child: const Text( +// 'Choose a Car', +// style: TextStyle( +// color: Colors.white, +// fontSize: 24, +// fontWeight: FontWeight.w600), +// )), +// Positioned( +// height: 50, +// left: size.width * 0.05, +// top: size.height * 0.17, +// child: Row( +// children: [ +// Container( +// width: size.width * 0.8, +// padding: const EdgeInsets.only( +// top: 5, bottom: 5, left: 15, right: 5), +// decoration: BoxDecoration( +// borderRadius: BorderRadius.circular(15), // radius of 10 +// color: Colors.white, +// ), +// child: Row( +// children: [ +// const Icon( +// Icons.location_on_outlined, +// color: Colors.grey, +// size: 24, +// ), +// const Text( +// ' Florida, USA', +// style: TextStyle( +// color: Colors.black87, +// fontSize: 17, +// fontWeight: FontWeight.bold), +// ), +// Expanded( +// child: Container(), +// ), +// Container( +// width: 40, +// height: 40, +// decoration: BoxDecoration( +// borderRadius: +// BorderRadius.circular(13), // radius of 10 +// color: const Color(0xfff26cab)), +// child: const Icon( +// Icons.date_range_outlined, +// color: Colors.white, +// )) +// ], +// ), +// ), +// const SizedBox( +// width: 10, +// ), +// const Icon( +// Icons.tune_outlined, +// color: Colors.white, +// size: 30, +// ), +// ], +// ), +// ), +// ], +// ); +// } +// } +// +// class BuildCardView extends StatefulWidget { +// const BuildCardView({Key? key, required this.car}) : super(key: key); +// final Car car; +// @override +// _BuildCardViewState createState() => _BuildCardViewState(); +// } +// +// class _BuildCardViewState extends State { +// @override +// Widget build(BuildContext context) { +// // Size size = MediaQuery.of(context).size; +// return Padding( +// padding: const EdgeInsets.all(20), +// child: Container( +// decoration: BoxDecoration( +// boxShadow: [ +// BoxShadow( +// color: Colors.grey.withOpacity(0.3), +// blurRadius: 20, +// spreadRadius: 0, +// offset: const Offset(5, 5)) +// ], +// ), +// child: Stack( +// children: [ +// ClipPath( +// clipper: MyCustomClipper(), +// child: Card( +// elevation: 0, +// shape: RoundedRectangleBorder( +// borderRadius: BorderRadius.circular(35), +// ), +// color: Colors.white, +// child: Padding( +// padding: const EdgeInsets.all(30), +// child: Column( +// children: [ +// Row( +// mainAxisAlignment: MainAxisAlignment.spaceBetween, +// children: [ +// Container( +// padding: const EdgeInsets.symmetric( +// vertical: 4, horizontal: 7), +// decoration: BoxDecoration( +// borderRadius: BorderRadius.circular(13), +// color: const Color(0xfffec05f)), +// child: Row( +// children: [ +// const Icon( +// Icons.star_rounded, +// color: Colors.white, +// size: 17, +// ), +// Text( +// ' ${widget.car.rating}', +// style: const TextStyle( +// color: Colors.white, +// fontSize: 17, +// fontWeight: FontWeight.w800), +// ) +// ], +// ), +// ), +// Text( +// ' ${widget.car.deals} Deals', +// style: const TextStyle( +// color: Color(0xff78c4ad), +// fontSize: 17, +// fontWeight: FontWeight.w800), +// ) +// ], +// ), +// Center( +// child: Image.asset(widget.car.image), +// ), +// const SizedBox( +// height: 10, +// ), +// Row( +// mainAxisAlignment: MainAxisAlignment.start, +// children: [ +// Column( +// crossAxisAlignment: CrossAxisAlignment.start, +// children: [ +// Text( +// widget.car.name, +// style: const TextStyle( +// color: Colors.black87, +// fontSize: 20, +// fontWeight: FontWeight.bold), +// ), +// Text( +// 'From${widget.car.price} /day', +// style: const TextStyle( +// color: Colors.grey, +// fontSize: 17, +// fontWeight: FontWeight.w800), +// ) +// ], +// ), +// ], +// ) +// ], +// ), +// ), +// ), +// ), +// Positioned( +// height: 80, +// width: 80, +// bottom: 0, +// right: 0, +// child: IconButton( +// onPressed: () { +// Navigator.push( +// context, +// MaterialPageRoute( +// builder: (context) => CarDetailsView( +// car: widget.car, +// )), +// ); +// }, +// icon: Container( +// width: 80, +// height: 80, +// decoration: BoxDecoration( +// borderRadius: BorderRadius.circular(25), +// color: const Color(0xff2156c0)), +// child: const Icon( +// Icons.double_arrow_rounded, +// color: Colors.white, +// ), +// )), +// ) +// ], +// ), +// ), +// ); +// } +// } +// +// class MyCustomClipper extends CustomClipper { +// @override +// Path getClip(Size size) { +// +// var path = Path(); +// path.moveTo(0, 0); +// path.lineTo(0, size.height); +// path.lineTo(size.width * 0.76, size.height); +// +// path.quadraticBezierTo( +// size.width / 1.45, size.height * 0.67, size.width, size.height / 1.35); +// path.lineTo(size.width, 0); +// return path; +// } +// +// @override +// bool shouldReclip(covariant CustomClipper oldClipper) { +// return true; +// } +// } diff --git a/lib/task 2 cars reting/main.dart b/lib/task 2 cars reting/main.dart new file mode 100644 index 0000000..053e1c1 --- /dev/null +++ b/lib/task 2 cars reting/main.dart @@ -0,0 +1,111 @@ +// import 'first_page.dart'; +// import 'package:flutter/material.dart'; +// import 'package:flutter/services.dart'; +// +// void main() { +// SystemChrome.setSystemUIOverlayStyle(const SystemUiOverlayStyle( +// statusBarColor: Colors.transparent, +// statusBarIconBrightness: Brightness.light, +// )); +// runApp(const MyApp()); +// } +// +// class Car { +// String name; +// String image; +// int price; +// double rating; +// int deals; +// +// Car( +// {required this.image, +// required this.name, +// required this.price, +// required this.rating, +// required this.deals}); +// } +// +// List cars = [ +// Car( +// image: 'images/car2.png', +// name: ' BMW', +// price: 199, +// rating: 4.3, +// deals: 15), +// Car( +// image: 'images/car1.png', +// name: ' Audi', +// price: 299, +// rating: 4.8, +// deals: 27), +// ]; +// +// class MyApp extends StatelessWidget { +// const MyApp({Key? key}) : super(key: key); +// +// @override +// Widget build(BuildContext context) { +// return MaterialApp( +// title: ' Rating Cars ', +// debugShowCheckedModeBanner: false, +// theme: ThemeData( +// primarySwatch: Colors.blue, +// ), +// home: const CollectionPage(), +// ); +// } +// } +// +// +// +// +// class CollectionPage extends StatelessWidget { +// const CollectionPage({Key? key}) : super(key: key); +// +// +// @override +// Widget build(BuildContext context) { +// +// return Scaffold( +// backgroundColor: const Color(0xfffcfcfc), +// appBar: const PreferredSize( +// preferredSize: Size.fromHeight(180), child: MyAppBar()), +// body: Column( +// children: [ +// Container( +// padding: const EdgeInsets.only(top: 17, left: 17, right: 17), +// child: Row( +// mainAxisAlignment: MainAxisAlignment.spaceBetween, +// children: const [ +// Text( +// '23 Results', +// style: TextStyle( +// color: Colors.black87, +// fontSize: 21, +// fontWeight: FontWeight.w700), +// ), +// Icon( +// Icons.more_horiz, +// color: Colors.black87, +// size: 33, +// ) +// ], +// ), +// ), +// Expanded( +// child: ListView.builder( +// scrollDirection: Axis.vertical, +// shrinkWrap: true, +// itemBuilder: (_context, index) { +// return BuildCardView( +// car: cars[index], +// ); +// }, +// itemCount: cars.length, +// ), +// ), +// ], +// ), +// ); +// } +// } diff --git a/lib/task 2 files/main.dart b/lib/task 2 files/main.dart new file mode 100644 index 0000000..42dcd73 --- /dev/null +++ b/lib/task 2 files/main.dart @@ -0,0 +1,140 @@ +// import 'package:flutter/material.dart'; +// import 'package:shared_preferences/shared_preferences.dart'; +// import 'new_note_page.dart'; +// +// void main() => runApp(NoteApp()); +// +// class NoteApp extends StatelessWidget { +// @override +// Widget build(BuildContext context) { +// return MaterialApp( +// debugShowCheckedModeBanner: false, +// title: 'Notes App', +// theme: ThemeData( +// primarySwatch: Colors.purple, +// ), +// home: MyHomePage(title: 'Note App'), +// ); +// } +// } +// +// class MyHomePage extends StatefulWidget { +// MyHomePage({Key? key, required this.title}) : super(key: key); +// +// final String title; +// +// @override +// _MyHomePageState createState() => _MyHomePageState(); +// } +// +// class _MyHomePageState extends State { +// List notes = []; +// +// Future getData({String? get}) async { +// final prefs = await SharedPreferences.getInstance(); +// setState(() { +// var notesList = prefs.getStringList('noteContent'); +// if (notesList != null) +// for (int i = 0; i < notesList.length; i++) { +// if (get == 'get') +// notes.add(NoteModel(notesList[i])); +// else { +// notes.removeWhere((element) => element == NoteModel(notesList[i])); +// } +// } +// }); +// } +// +// @override +// void initState() { +// super.initState(); +// getData(get: 'get'); +// } +// +// void removeNote(NoteModel note) { +// setState(() { +// notes.remove(note); +// getData(); +// setData(); +// }); +// } +// +// void openNewNote({NoteModel? noteModel}) { +// NoteModel _note = noteModel ?? NoteModel(''); +// Navigator.of(context) +// .push(MaterialPageRoute(builder: (context) => NewNotePage(_note))) +// .then((_) { +// setState( +// () { +// if (noteModel == null) { +// if (_note.content.isNotEmpty) notes.add(_note); +// } +// }, +// ); +// setData(); +// }); +// } +// +// Future setData() async { +// final prefs = await SharedPreferences.getInstance(); +// prefs.setStringList('noteContent', notes.map((e) => e.content).toList()); +// } +// +// Widget noteItemView(NoteModel note) { +// return Card( +// child: InkWell( +// onTap: () { +// openNewNote(noteModel: note); +// }, +// child: Padding( +// padding: const EdgeInsets.all(30.0), +// child: Row( +// children: [ +// Expanded( +// child: Text( +// note.content, +// maxLines: 1, +// overflow: TextOverflow.ellipsis, +// softWrap: true, +// style: TextStyle(fontSize: 30.0), +// ), +// ), +// Expanded(child: Container()), +// IconButton( +// onPressed: () => removeNote(note), +// icon: Icon( +// Icons.remove_circle_outline, +// color: Colors.red, +// )), +// ], +// ), +// ), +// ), +// ); +// } +// +// Widget buildNotesList() { +// return ListView.builder( +// itemBuilder: (_context, index) => noteItemView(notes[index]), +// itemCount: notes.length, +// ); +// } +// +// @override +// Widget build(BuildContext context) { +// return DefaultTabController( +// length: 2, +// child: Scaffold( +// appBar: AppBar( +// title: Text(widget.title), +// ), +// body: buildNotesList(), +// floatingActionButton: FloatingActionButton( +// onPressed: openNewNote, +// tooltip: 'Add new note', +// child: const Icon(Icons.add), +// ), +// ), +// ); +// } +// } diff --git a/lib/task 2 files/new_note_page.dart b/lib/task 2 files/new_note_page.dart new file mode 100644 index 0000000..9d14869 --- /dev/null +++ b/lib/task 2 files/new_note_page.dart @@ -0,0 +1,55 @@ +// import 'package:flutter/material.dart'; +// +// class NoteModel { +// NoteModel(this.content); +// String content; +// } +// +// class NewNotePage extends StatefulWidget { +// const NewNotePage(this.noteModel); +// final NoteModel noteModel; +// @override +// _NewNotePageState createState() => _NewNotePageState(); +// } +// +// class _NewNotePageState extends State { +// var _controller = TextEditingController(); +// +// @override +// void initState() { +// _controller.text = widget.noteModel.content; +// super.initState(); +// } +// +// @override +// Widget build(BuildContext context) { +// return Scaffold( +// appBar: AppBar( +// title: Text('New Note'), +// ), +// body: Padding( +// padding: const EdgeInsets.all(8.0), +// child: TextField( +// controller: _controller, +// onChanged: (str) { +// widget.noteModel.content = str; +// }, +// decoration: InputDecoration( +// labelText: 'input note', +// labelStyle: TextStyle(color: Colors.grey, fontSize: 20.0), +// ), +// maxLines: null, +// style: TextStyle(fontSize: 30.0, fontWeight: FontWeight.w500), +// autofocus: true, +// keyboardType: TextInputType.multiline, +// ), +// ), +// floatingActionButton: FloatingActionButton( +// onPressed: () { +// Navigator.of(context).pop(); +// }, +// child: Icon(Icons.check), +// ), +// ); +// } +// } diff --git a/macos/.gitignore b/macos/.gitignore deleted file mode 100644 index d2fd377..0000000 --- a/macos/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -# Flutter-related -**/Flutter/ephemeral/ -**/Pods/ - -# Xcode-related -**/xcuserdata/ diff --git a/macos/Flutter/Flutter-Debug.xcconfig b/macos/Flutter/Flutter-Debug.xcconfig deleted file mode 100644 index c2efd0b..0000000 --- a/macos/Flutter/Flutter-Debug.xcconfig +++ /dev/null @@ -1 +0,0 @@ -#include "ephemeral/Flutter-Generated.xcconfig" diff --git a/macos/Flutter/Flutter-Release.xcconfig b/macos/Flutter/Flutter-Release.xcconfig deleted file mode 100644 index c2efd0b..0000000 --- a/macos/Flutter/Flutter-Release.xcconfig +++ /dev/null @@ -1 +0,0 @@ -#include "ephemeral/Flutter-Generated.xcconfig" diff --git a/macos/Flutter/GeneratedPluginRegistrant.swift b/macos/Flutter/GeneratedPluginRegistrant.swift deleted file mode 100644 index cccf817..0000000 --- a/macos/Flutter/GeneratedPluginRegistrant.swift +++ /dev/null @@ -1,10 +0,0 @@ -// -// Generated file. Do not edit. -// - -import FlutterMacOS -import Foundation - - -func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { -} diff --git a/macos/Runner.xcodeproj/project.pbxproj b/macos/Runner.xcodeproj/project.pbxproj deleted file mode 100644 index 7f77184..0000000 --- a/macos/Runner.xcodeproj/project.pbxproj +++ /dev/null @@ -1,572 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 51; - objects = { - -/* Begin PBXAggregateTarget section */ - 33CC111A2044C6BA0003C045 /* Flutter Assemble */ = { - isa = PBXAggregateTarget; - buildConfigurationList = 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */; - buildPhases = ( - 33CC111E2044C6BF0003C045 /* ShellScript */, - ); - dependencies = ( - ); - name = "Flutter Assemble"; - productName = FLX; - }; -/* End PBXAggregateTarget section */ - -/* Begin PBXBuildFile section */ - 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */ = {isa = PBXBuildFile; fileRef = 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */; }; - 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC10F02044A3C60003C045 /* AppDelegate.swift */; }; - 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F22044A3C60003C045 /* Assets.xcassets */; }; - 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 33CC10F42044A3C60003C045 /* MainMenu.xib */; }; - 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 33CC10E52044A3C60003C045 /* Project object */; - proxyType = 1; - remoteGlobalIDString = 33CC111A2044C6BA0003C045; - remoteInfo = FLX; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 33CC110E2044A8840003C045 /* Bundle Framework */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - ); - name = "Bundle Framework"; - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = ""; }; - 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = ""; }; - 33CC10ED2044A3C60003C045 /* contacts_01.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "contacts_01.app"; sourceTree = BUILT_PRODUCTS_DIR; }; - 33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; - 33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = ""; }; - 33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; }; - 33CC10F72044A3C60003C045 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = Info.plist; path = Runner/Info.plist; sourceTree = ""; }; - 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainFlutterWindow.swift; sourceTree = ""; }; - 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Debug.xcconfig"; sourceTree = ""; }; - 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = "Flutter-Release.xcconfig"; sourceTree = ""; }; - 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = "Flutter-Generated.xcconfig"; path = "ephemeral/Flutter-Generated.xcconfig"; sourceTree = ""; }; - 33E51913231747F40026EE4D /* DebugProfile.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = DebugProfile.entitlements; sourceTree = ""; }; - 33E51914231749380026EE4D /* Release.entitlements */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.entitlements; path = Release.entitlements; sourceTree = ""; }; - 33E5194F232828860026EE4D /* AppInfo.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = AppInfo.xcconfig; sourceTree = ""; }; - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Release.xcconfig; sourceTree = ""; }; - 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Debug.xcconfig; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 33CC10EA2044A3C60003C045 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 33BA886A226E78AF003329D5 /* Configs */ = { - isa = PBXGroup; - children = ( - 33E5194F232828860026EE4D /* AppInfo.xcconfig */, - 9740EEB21CF90195004384FC /* Debug.xcconfig */, - 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, - 333000ED22D3DE5D00554162 /* Warnings.xcconfig */, - ); - path = Configs; - sourceTree = ""; - }; - 33CC10E42044A3C60003C045 = { - isa = PBXGroup; - children = ( - 33FAB671232836740065AC1E /* Runner */, - 33CEB47122A05771004F2AC0 /* Flutter */, - 33CC10EE2044A3C60003C045 /* Products */, - D73912EC22F37F3D000D13A0 /* Frameworks */, - ); - sourceTree = ""; - }; - 33CC10EE2044A3C60003C045 /* Products */ = { - isa = PBXGroup; - children = ( - 33CC10ED2044A3C60003C045 /* contacts_01.app */, - ); - name = Products; - sourceTree = ""; - }; - 33CC11242044D66E0003C045 /* Resources */ = { - isa = PBXGroup; - children = ( - 33CC10F22044A3C60003C045 /* Assets.xcassets */, - 33CC10F42044A3C60003C045 /* MainMenu.xib */, - 33CC10F72044A3C60003C045 /* Info.plist */, - ); - name = Resources; - path = ..; - sourceTree = ""; - }; - 33CEB47122A05771004F2AC0 /* Flutter */ = { - isa = PBXGroup; - children = ( - 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */, - 33CEB47222A05771004F2AC0 /* Flutter-Debug.xcconfig */, - 33CEB47422A05771004F2AC0 /* Flutter-Release.xcconfig */, - 33CEB47722A0578A004F2AC0 /* Flutter-Generated.xcconfig */, - ); - path = Flutter; - sourceTree = ""; - }; - 33FAB671232836740065AC1E /* Runner */ = { - isa = PBXGroup; - children = ( - 33CC10F02044A3C60003C045 /* AppDelegate.swift */, - 33CC11122044BFA00003C045 /* MainFlutterWindow.swift */, - 33E51913231747F40026EE4D /* DebugProfile.entitlements */, - 33E51914231749380026EE4D /* Release.entitlements */, - 33CC11242044D66E0003C045 /* Resources */, - 33BA886A226E78AF003329D5 /* Configs */, - ); - path = Runner; - sourceTree = ""; - }; - D73912EC22F37F3D000D13A0 /* Frameworks */ = { - isa = PBXGroup; - children = ( - ); - name = Frameworks; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 33CC10EC2044A3C60003C045 /* Runner */ = { - isa = PBXNativeTarget; - buildConfigurationList = 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */; - buildPhases = ( - 33CC10E92044A3C60003C045 /* Sources */, - 33CC10EA2044A3C60003C045 /* Frameworks */, - 33CC10EB2044A3C60003C045 /* Resources */, - 33CC110E2044A8840003C045 /* Bundle Framework */, - 3399D490228B24CF009A79C7 /* ShellScript */, - ); - buildRules = ( - ); - dependencies = ( - 33CC11202044C79F0003C045 /* PBXTargetDependency */, - ); - name = Runner; - productName = Runner; - productReference = 33CC10ED2044A3C60003C045 /* contacts_01.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 33CC10E52044A3C60003C045 /* Project object */ = { - isa = PBXProject; - attributes = { - LastSwiftUpdateCheck = 0920; - LastUpgradeCheck = 0930; - ORGANIZATIONNAME = ""; - TargetAttributes = { - 33CC10EC2044A3C60003C045 = { - CreatedOnToolsVersion = 9.2; - LastSwiftMigration = 1100; - ProvisioningStyle = Automatic; - SystemCapabilities = { - com.apple.Sandbox = { - enabled = 1; - }; - }; - }; - 33CC111A2044C6BA0003C045 = { - CreatedOnToolsVersion = 9.2; - ProvisioningStyle = Manual; - }; - }; - }; - buildConfigurationList = 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */; - compatibilityVersion = "Xcode 9.3"; - developmentRegion = en; - hasScannedForEncodings = 0; - knownRegions = ( - en, - Base, - ); - mainGroup = 33CC10E42044A3C60003C045; - productRefGroup = 33CC10EE2044A3C60003C045 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 33CC10EC2044A3C60003C045 /* Runner */, - 33CC111A2044C6BA0003C045 /* Flutter Assemble */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXResourcesBuildPhase section */ - 33CC10EB2044A3C60003C045 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 33CC10F32044A3C60003C045 /* Assets.xcassets in Resources */, - 33CC10F62044A3C60003C045 /* MainMenu.xib in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXShellScriptBuildPhase section */ - 3399D490228B24CF009A79C7 /* ShellScript */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - ); - inputPaths = ( - ); - outputFileListPaths = ( - ); - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "echo \"$PRODUCT_NAME.app\" > \"$PROJECT_DIR\"/Flutter/ephemeral/.app_filename && \"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh embed\n"; - }; - 33CC111E2044C6BF0003C045 /* ShellScript */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputFileListPaths = ( - Flutter/ephemeral/FlutterInputs.xcfilelist, - ); - inputPaths = ( - Flutter/ephemeral/tripwire, - ); - outputFileListPaths = ( - Flutter/ephemeral/FlutterOutputs.xcfilelist, - ); - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"$FLUTTER_ROOT\"/packages/flutter_tools/bin/macos_assemble.sh && touch Flutter/ephemeral/tripwire"; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 33CC10E92044A3C60003C045 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 33CC11132044BFA00003C045 /* MainFlutterWindow.swift in Sources */, - 33CC10F12044A3C60003C045 /* AppDelegate.swift in Sources */, - 335BBD1B22A9A15E00E9071D /* GeneratedPluginRegistrant.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 33CC11202044C79F0003C045 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 33CC111A2044C6BA0003C045 /* Flutter Assemble */; - targetProxy = 33CC111F2044C79F0003C045 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin PBXVariantGroup section */ - 33CC10F42044A3C60003C045 /* MainMenu.xib */ = { - isa = PBXVariantGroup; - children = ( - 33CC10F52044A3C60003C045 /* Base */, - ); - name = MainMenu.xib; - path = Runner; - sourceTree = ""; - }; -/* End PBXVariantGroup section */ - -/* Begin XCBuildConfiguration section */ - 338D0CE9231458BD00FA5F75 /* Profile */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CODE_SIGN_IDENTITY = "-"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.11; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = macosx; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - }; - name = Profile; - }; - 338D0CEA231458BD00FA5F75 /* Profile */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements; - CODE_SIGN_STYLE = Automatic; - COMBINE_HIDPI_IMAGES = YES; - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/../Frameworks", - ); - PROVISIONING_PROFILE_SPECIFIER = ""; - SWIFT_VERSION = 5.0; - }; - name = Profile; - }; - 338D0CEB231458BD00FA5F75 /* Profile */ = { - isa = XCBuildConfiguration; - buildSettings = { - CODE_SIGN_STYLE = Manual; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Profile; - }; - 33CC10F92044A3C60003C045 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CODE_SIGN_IDENTITY = "-"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = dwarf; - ENABLE_STRICT_OBJC_MSGSEND = YES; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_DYNAMIC_NO_PIC = NO; - GCC_NO_COMMON_BLOCKS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.11; - MTL_ENABLE_DEBUG_INFO = YES; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = macosx; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - }; - name = Debug; - }; - 33CC10FA2044A3C60003C045 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; - CLANG_WARN_DOCUMENTATION_COMMENTS = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INFINITE_RECURSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; - CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; - CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; - CLANG_WARN_SUSPICIOUS_MOVE = YES; - CODE_SIGN_IDENTITY = "-"; - COPY_PHASE_STRIP = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - ENABLE_NS_ASSERTIONS = NO; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_C_LANGUAGE_STANDARD = gnu11; - GCC_NO_COMMON_BLOCKS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; - GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.11; - MTL_ENABLE_DEBUG_INFO = NO; - SDKROOT = macosx; - SWIFT_COMPILATION_MODE = wholemodule; - SWIFT_OPTIMIZATION_LEVEL = "-O"; - }; - name = Release; - }; - 33CC10FC2044A3C60003C045 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = Runner/DebugProfile.entitlements; - CODE_SIGN_STYLE = Automatic; - COMBINE_HIDPI_IMAGES = YES; - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/../Frameworks", - ); - PROVISIONING_PROFILE_SPECIFIER = ""; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 5.0; - }; - name = Debug; - }; - 33CC10FD2044A3C60003C045 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 33E5194F232828860026EE4D /* AppInfo.xcconfig */; - buildSettings = { - ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; - CLANG_ENABLE_MODULES = YES; - CODE_SIGN_ENTITLEMENTS = Runner/Release.entitlements; - CODE_SIGN_STYLE = Automatic; - COMBINE_HIDPI_IMAGES = YES; - INFOPLIST_FILE = Runner/Info.plist; - LD_RUNPATH_SEARCH_PATHS = ( - "$(inherited)", - "@executable_path/../Frameworks", - ); - PROVISIONING_PROFILE_SPECIFIER = ""; - SWIFT_VERSION = 5.0; - }; - name = Release; - }; - 33CC111C2044C6BA0003C045 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CODE_SIGN_STYLE = Manual; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Debug; - }; - 33CC111D2044C6BA0003C045 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CODE_SIGN_STYLE = Automatic; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 33CC10E82044A3C60003C045 /* Build configuration list for PBXProject "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 33CC10F92044A3C60003C045 /* Debug */, - 33CC10FA2044A3C60003C045 /* Release */, - 338D0CE9231458BD00FA5F75 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 33CC10FB2044A3C60003C045 /* Build configuration list for PBXNativeTarget "Runner" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 33CC10FC2044A3C60003C045 /* Debug */, - 33CC10FD2044A3C60003C045 /* Release */, - 338D0CEA231458BD00FA5F75 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 33CC111B2044C6BA0003C045 /* Build configuration list for PBXAggregateTarget "Flutter Assemble" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 33CC111C2044C6BA0003C045 /* Debug */, - 33CC111D2044C6BA0003C045 /* Release */, - 338D0CEB231458BD00FA5F75 /* Profile */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 33CC10E52044A3C60003C045 /* Project object */; -} diff --git a/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d9810..0000000 --- a/macos/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme deleted file mode 100644 index 36bd861..0000000 --- a/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/macos/Runner.xcworkspace/contents.xcworkspacedata b/macos/Runner.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 1d526a1..0000000 --- a/macos/Runner.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist deleted file mode 100644 index 18d9810..0000000 --- a/macos/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +++ /dev/null @@ -1,8 +0,0 @@ - - - - - IDEDidComputeMac32BitWarning - - - diff --git a/macos/Runner/AppDelegate.swift b/macos/Runner/AppDelegate.swift deleted file mode 100644 index d53ef64..0000000 --- a/macos/Runner/AppDelegate.swift +++ /dev/null @@ -1,9 +0,0 @@ -import Cocoa -import FlutterMacOS - -@NSApplicationMain -class AppDelegate: FlutterAppDelegate { - override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { - return true - } -} diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json deleted file mode 100644 index a2ec33f..0000000 --- a/macos/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json +++ /dev/null @@ -1,68 +0,0 @@ -{ - "images" : [ - { - "size" : "16x16", - "idiom" : "mac", - "filename" : "app_icon_16.png", - "scale" : "1x" - }, - { - "size" : "16x16", - "idiom" : "mac", - "filename" : "app_icon_32.png", - "scale" : "2x" - }, - { - "size" : "32x32", - "idiom" : "mac", - "filename" : "app_icon_32.png", - "scale" : "1x" - }, - { - "size" : "32x32", - "idiom" : "mac", - "filename" : "app_icon_64.png", - "scale" : "2x" - }, - { - "size" : "128x128", - "idiom" : "mac", - "filename" : "app_icon_128.png", - "scale" : "1x" - }, - { - "size" : "128x128", - "idiom" : "mac", - "filename" : "app_icon_256.png", - "scale" : "2x" - }, - { - "size" : "256x256", - "idiom" : "mac", - "filename" : "app_icon_256.png", - "scale" : "1x" - }, - { - "size" : "256x256", - "idiom" : "mac", - "filename" : "app_icon_512.png", - "scale" : "2x" - }, - { - "size" : "512x512", - "idiom" : "mac", - "filename" : "app_icon_512.png", - "scale" : "1x" - }, - { - "size" : "512x512", - "idiom" : "mac", - "filename" : "app_icon_1024.png", - "scale" : "2x" - } - ], - "info" : { - "version" : 1, - "author" : "xcode" - } -} diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png deleted file mode 100644 index 3c4935a..0000000 Binary files a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_1024.png and /dev/null differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png deleted file mode 100644 index ed4cc16..0000000 Binary files a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_128.png and /dev/null differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png deleted file mode 100644 index 483be61..0000000 Binary files a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_16.png and /dev/null differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png deleted file mode 100644 index bcbf36d..0000000 Binary files a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_256.png and /dev/null differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png deleted file mode 100644 index 9c0a652..0000000 Binary files a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_32.png and /dev/null differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png deleted file mode 100644 index e71a726..0000000 Binary files a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_512.png and /dev/null differ diff --git a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png b/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png deleted file mode 100644 index 8a31fe2..0000000 Binary files a/macos/Runner/Assets.xcassets/AppIcon.appiconset/app_icon_64.png and /dev/null differ diff --git a/macos/Runner/Base.lproj/MainMenu.xib b/macos/Runner/Base.lproj/MainMenu.xib deleted file mode 100644 index 537341a..0000000 --- a/macos/Runner/Base.lproj/MainMenu.xib +++ /dev/null @@ -1,339 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/macos/Runner/Configs/AppInfo.xcconfig b/macos/Runner/Configs/AppInfo.xcconfig deleted file mode 100644 index 6173ed4..0000000 --- a/macos/Runner/Configs/AppInfo.xcconfig +++ /dev/null @@ -1,14 +0,0 @@ -// Application-level settings for the Runner target. -// -// This may be replaced with something auto-generated from metadata (e.g., pubspec.yaml) in the -// future. If not, the values below would default to using the project name when this becomes a -// 'flutter create' template. - -// The application's name. By default this is also the title of the Flutter window. -PRODUCT_NAME = contacts_01 - -// The application's bundle identifier -PRODUCT_BUNDLE_IDENTIFIER = com.example.contacts01 - -// The copyright displayed in application information -PRODUCT_COPYRIGHT = Copyright © 2021 com.example. All rights reserved. diff --git a/macos/Runner/Configs/Debug.xcconfig b/macos/Runner/Configs/Debug.xcconfig deleted file mode 100644 index 36b0fd9..0000000 --- a/macos/Runner/Configs/Debug.xcconfig +++ /dev/null @@ -1,2 +0,0 @@ -#include "../../Flutter/Flutter-Debug.xcconfig" -#include "Warnings.xcconfig" diff --git a/macos/Runner/Configs/Release.xcconfig b/macos/Runner/Configs/Release.xcconfig deleted file mode 100644 index dff4f49..0000000 --- a/macos/Runner/Configs/Release.xcconfig +++ /dev/null @@ -1,2 +0,0 @@ -#include "../../Flutter/Flutter-Release.xcconfig" -#include "Warnings.xcconfig" diff --git a/macos/Runner/Configs/Warnings.xcconfig b/macos/Runner/Configs/Warnings.xcconfig deleted file mode 100644 index 42bcbf4..0000000 --- a/macos/Runner/Configs/Warnings.xcconfig +++ /dev/null @@ -1,13 +0,0 @@ -WARNING_CFLAGS = -Wall -Wconditional-uninitialized -Wnullable-to-nonnull-conversion -Wmissing-method-return-type -Woverlength-strings -GCC_WARN_UNDECLARED_SELECTOR = YES -CLANG_UNDEFINED_BEHAVIOR_SANITIZER_NULLABILITY = YES -CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE -CLANG_WARN__DUPLICATE_METHOD_MATCH = YES -CLANG_WARN_PRAGMA_PACK = YES -CLANG_WARN_STRICT_PROTOTYPES = YES -CLANG_WARN_COMMA = YES -GCC_WARN_STRICT_SELECTOR_MATCH = YES -CLANG_WARN_OBJC_REPEATED_USE_OF_WEAK = YES -CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES -GCC_WARN_SHADOW = YES -CLANG_WARN_UNREACHABLE_CODE = YES diff --git a/macos/Runner/DebugProfile.entitlements b/macos/Runner/DebugProfile.entitlements deleted file mode 100644 index dddb8a3..0000000 --- a/macos/Runner/DebugProfile.entitlements +++ /dev/null @@ -1,12 +0,0 @@ - - - - - com.apple.security.app-sandbox - - com.apple.security.cs.allow-jit - - com.apple.security.network.server - - - diff --git a/macos/Runner/Info.plist b/macos/Runner/Info.plist deleted file mode 100644 index 4789daa..0000000 --- a/macos/Runner/Info.plist +++ /dev/null @@ -1,32 +0,0 @@ - - - - - CFBundleDevelopmentRegion - $(DEVELOPMENT_LANGUAGE) - CFBundleExecutable - $(EXECUTABLE_NAME) - CFBundleIconFile - - CFBundleIdentifier - $(PRODUCT_BUNDLE_IDENTIFIER) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - APPL - CFBundleShortVersionString - $(FLUTTER_BUILD_NAME) - CFBundleVersion - $(FLUTTER_BUILD_NUMBER) - LSMinimumSystemVersion - $(MACOSX_DEPLOYMENT_TARGET) - NSHumanReadableCopyright - $(PRODUCT_COPYRIGHT) - NSMainNibFile - MainMenu - NSPrincipalClass - NSApplication - - diff --git a/macos/Runner/MainFlutterWindow.swift b/macos/Runner/MainFlutterWindow.swift deleted file mode 100644 index 2722837..0000000 --- a/macos/Runner/MainFlutterWindow.swift +++ /dev/null @@ -1,15 +0,0 @@ -import Cocoa -import FlutterMacOS - -class MainFlutterWindow: NSWindow { - override func awakeFromNib() { - let flutterViewController = FlutterViewController.init() - let windowFrame = self.frame - self.contentViewController = flutterViewController - self.setFrame(windowFrame, display: true) - - RegisterGeneratedPlugins(registry: flutterViewController) - - super.awakeFromNib() - } -} diff --git a/macos/Runner/Release.entitlements b/macos/Runner/Release.entitlements deleted file mode 100644 index 852fa1a..0000000 --- a/macos/Runner/Release.entitlements +++ /dev/null @@ -1,8 +0,0 @@ - - - - - com.apple.security.app-sandbox - - - diff --git a/pubspec.lock b/pubspec.lock index 750761f..4cb51ff 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -62,25 +62,32 @@ packages: description: flutter source: sdk version: "0.0.0" - flutter_lints: - dependency: "direct dev" - description: - name: flutter_lints - url: "https://pub.dartlang.org" - source: hosted - version: "1.0.4" flutter_test: dependency: "direct dev" description: flutter source: sdk version: "0.0.0" - lints: + http: + dependency: "direct main" + description: + name: http + url: "https://pub.dartlang.org" + source: hosted + version: "0.12.2" + http_parser: dependency: transitive description: - name: lints + name: http_parser url: "https://pub.dartlang.org" source: hosted - version: "1.0.1" + version: "3.1.4" + intl: + dependency: "direct main" + description: + name: intl + url: "https://pub.dartlang.org" + source: hosted + version: "0.16.1" matcher: dependency: transitive description: @@ -102,6 +109,13 @@ packages: url: "https://pub.dartlang.org" source: hosted version: "1.8.0" + pedantic: + dependency: transitive + description: + name: pedantic + url: "https://pub.dartlang.org" + source: hosted + version: "1.11.1" sky_engine: dependency: transitive description: flutter diff --git a/pubspec.yaml b/pubspec.yaml index 1c93cc7..a9637b9 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,8 +1,8 @@ -name: contacts_01 +name: BgWeather description: A new Flutter project. # The following line prevents the package from being accidentally published to -# pub.dev using `flutter pub publish`. This is preferred for private packages. +# pub.dev using `pub publish`. This is preferred for private packages. publish_to: 'none' # Remove this line if you wish to publish to pub.dev # The following defines the version and build number for your application. @@ -18,33 +18,25 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev version: 1.0.0+1 environment: - sdk: ">=2.12.0 <3.0.0" - -# Dependencies specify other packages that your package needs in order to work. -# To automatically upgrade your package dependencies to the latest versions -# consider running `flutter pub upgrade --major-versions`. Alternatively, -# dependencies can be manually updated by changing the version numbers below to -# the latest version available on pub.dev. To see which dependencies have newer -# versions available, run `flutter pub outdated`. + sdk: ">=2.7.0 <3.0.0" + dependencies: flutter: sdk: flutter + # Used for HTTP requests + http: ^0.12.1 # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. - cupertino_icons: ^1.0.2 + cupertino_icons: ^1.0.0 + + intl: ^0.16.1 dev_dependencies: flutter_test: sdk: flutter - # The "flutter_lints" package below contains a set of recommended lints to - # encourage good coding practices. The lint set provided by the package is - # activated in the `analysis_options.yaml` file located at the root of your - # package. See that file for information about deactivating specific lint - # rules and activating additional ones. - flutter_lints: ^1.0.0 # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec @@ -52,15 +44,11 @@ dev_dependencies: # The following section is specific to Flutter. flutter: - # The following line ensures that the Material Icons font is - # included with your application, so that you can use the icons in - # the material Icons class. uses-material-design: true # To add assets to your application, add an assets section, like this: - # assets: - # - images/a_dot_burr.jpeg - # - images/a_dot_ham.jpeg + assets: + - assets/icons/ # An image asset can refer to one or more resolution-specific "variants", see # https://flutter.dev/assets-and-images/#resolution-aware. diff --git a/test/widget_test.dart b/test/widget_test.dart deleted file mode 100644 index 5f578bd..0000000 --- a/test/widget_test.dart +++ /dev/null @@ -1,30 +0,0 @@ -// This is a basic Flutter widget test. -// -// To perform an interaction with a widget in your test, use the WidgetTester -// utility that Flutter provides. For example, you can send tap and scroll -// gestures. You can also use WidgetTester to find child widgets in the widget -// tree, read text, and verify that the values of widget properties are correct. - -import 'package:flutter/material.dart'; -import 'package:flutter_test/flutter_test.dart'; - -import 'package:contacts_01/main.dart'; - -void main() { - testWidgets('Counter increments smoke test', (WidgetTester tester) async { - // Build our app and trigger a frame. - await tester.pumpWidget(const MyApp()); - - // Verify that our counter starts at 0. - expect(find.text('0'), findsOneWidget); - expect(find.text('1'), findsNothing); - - // Tap the '+' icon and trigger a frame. - await tester.tap(find.byIcon(Icons.add)); - await tester.pump(); - - // Verify that our counter has incremented. - expect(find.text('0'), findsNothing); - expect(find.text('1'), findsOneWidget); - }); -} diff --git a/web/favicon.png b/web/favicon.png deleted file mode 100644 index 8aaa46a..0000000 Binary files a/web/favicon.png and /dev/null differ diff --git a/web/icons/Icon-192.png b/web/icons/Icon-192.png deleted file mode 100644 index b749bfe..0000000 Binary files a/web/icons/Icon-192.png and /dev/null differ diff --git a/web/icons/Icon-512.png b/web/icons/Icon-512.png deleted file mode 100644 index 88cfd48..0000000 Binary files a/web/icons/Icon-512.png and /dev/null differ diff --git a/web/icons/Icon-maskable-192.png b/web/icons/Icon-maskable-192.png deleted file mode 100644 index eb9b4d7..0000000 Binary files a/web/icons/Icon-maskable-192.png and /dev/null differ diff --git a/web/icons/Icon-maskable-512.png b/web/icons/Icon-maskable-512.png deleted file mode 100644 index d69c566..0000000 Binary files a/web/icons/Icon-maskable-512.png and /dev/null differ diff --git a/web/index.html b/web/index.html deleted file mode 100644 index d2606e7..0000000 --- a/web/index.html +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - - - - - - - - - - - - contacts_01 - - - - - - - diff --git a/web/manifest.json b/web/manifest.json deleted file mode 100644 index 9631a79..0000000 --- a/web/manifest.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "name": "contacts_01", - "short_name": "contacts_01", - "start_url": ".", - "display": "standalone", - "background_color": "#0175C2", - "theme_color": "#0175C2", - "description": "A new Flutter project.", - "orientation": "portrait-primary", - "prefer_related_applications": false, - "icons": [ - { - "src": "icons/Icon-192.png", - "sizes": "192x192", - "type": "image/png" - }, - { - "src": "icons/Icon-512.png", - "sizes": "512x512", - "type": "image/png" - }, - { - "src": "icons/Icon-maskable-192.png", - "sizes": "192x192", - "type": "image/png", - "purpose": "maskable" - }, - { - "src": "icons/Icon-maskable-512.png", - "sizes": "512x512", - "type": "image/png", - "purpose": "maskable" - } - ] -}