diff --git a/ios/Podfile.lock b/ios/Podfile.lock new file mode 100644 index 0000000..0a2f958 --- /dev/null +++ b/ios/Podfile.lock @@ -0,0 +1,59 @@ +PODS: + - Flutter (1.0.0) + - fluttertoast (0.0.2): + - Flutter + - Toast + - FMDB (2.7.5): + - FMDB/standard (= 2.7.5) + - FMDB/standard (2.7.5) + - geolocator_apple (1.2.0): + - Flutter + - path_provider_ios (0.0.1): + - Flutter + - shared_preferences_ios (0.0.1): + - Flutter + - sqflite (0.0.2): + - Flutter + - FMDB (>= 2.7.5) + - Toast (4.0.0) + +DEPENDENCIES: + - Flutter (from `Flutter`) + - fluttertoast (from `.symlinks/plugins/fluttertoast/ios`) + - geolocator_apple (from `.symlinks/plugins/geolocator_apple/ios`) + - path_provider_ios (from `.symlinks/plugins/path_provider_ios/ios`) + - shared_preferences_ios (from `.symlinks/plugins/shared_preferences_ios/ios`) + - sqflite (from `.symlinks/plugins/sqflite/ios`) + +SPEC REPOS: + trunk: + - FMDB + - Toast + +EXTERNAL SOURCES: + Flutter: + :path: Flutter + fluttertoast: + :path: ".symlinks/plugins/fluttertoast/ios" + geolocator_apple: + :path: ".symlinks/plugins/geolocator_apple/ios" + path_provider_ios: + :path: ".symlinks/plugins/path_provider_ios/ios" + shared_preferences_ios: + :path: ".symlinks/plugins/shared_preferences_ios/ios" + sqflite: + :path: ".symlinks/plugins/sqflite/ios" + +SPEC CHECKSUMS: + Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854 + fluttertoast: eb263d302cc92e04176c053d2385237e9f43fad0 + FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a + geolocator_apple: cc556e6844d508c95df1e87e3ea6fa4e58c50401 + path_provider_ios: 14f3d2fd28c4fdb42f44e0f751d12861c43cee02 + shared_preferences_ios: 548a61f8053b9b8a49ac19c1ffbc8b92c50d68ad + sqflite: 6d358c025f5b867b29ed92fc697fd34924e11904 + Toast: 91b396c56ee72a5790816f40d3a94dd357abc196 + +PODFILE CHECKSUM: ef19549a9bc3046e7bb7d2fab4d021637c0c58a3 + +COCOAPODS: 1.11.3 diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 290afb2..6fcbc30 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -13,6 +13,7 @@ 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; + D047B0551139B0542218D85D /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0D2E35C9457985CD97892AA8 /* Pods_Runner.framework */; }; /* End PBXBuildFile section */ /* Begin PBXCopyFilesBuildPhase section */ @@ -29,9 +30,11 @@ /* End PBXCopyFilesBuildPhase section */ /* Begin PBXFileReference section */ + 0D2E35C9457985CD97892AA8 /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; + 5A1043A042156649E4B1A453 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; @@ -42,6 +45,8 @@ 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + D3521BA78658C69C811BA0E6 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; + D4204FADD29F8302F140CEE5 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -49,12 +54,32 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + D047B0551139B0542218D85D /* Pods_Runner.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 1659E9201B5E5FF855303FCC /* Frameworks */ = { + isa = PBXGroup; + children = ( + 0D2E35C9457985CD97892AA8 /* Pods_Runner.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 2916ECFC7A0EAF642E568983 /* Pods */ = { + isa = PBXGroup; + children = ( + 5A1043A042156649E4B1A453 /* Pods-Runner.debug.xcconfig */, + D4204FADD29F8302F140CEE5 /* Pods-Runner.release.xcconfig */, + D3521BA78658C69C811BA0E6 /* Pods-Runner.profile.xcconfig */, + ); + name = Pods; + path = Pods; + sourceTree = ""; + }; 9740EEB11CF90186004384FC /* Flutter */ = { isa = PBXGroup; children = ( @@ -72,6 +97,8 @@ 9740EEB11CF90186004384FC /* Flutter */, 97C146F01CF9000F007C117D /* Runner */, 97C146EF1CF9000F007C117D /* Products */, + 2916ECFC7A0EAF642E568983 /* Pods */, + 1659E9201B5E5FF855303FCC /* Frameworks */, ); sourceTree = ""; }; @@ -105,12 +132,14 @@ isa = PBXNativeTarget; buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; buildPhases = ( + 2CB52418CA83A1AB9AF67F6C /* [CP] Check Pods Manifest.lock */, 9740EEB61CF901F6004384FC /* Run Script */, 97C146EA1CF9000F007C117D /* Sources */, 97C146EB1CF9000F007C117D /* Frameworks */, 97C146EC1CF9000F007C117D /* Resources */, 9705A1C41CF9048500538489 /* Embed Frameworks */, 3B06AD1E1E4923F5004D2608 /* Thin Binary */, + DCEC92BB0E38EF3BEB3563A5 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -169,6 +198,28 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ + 2CB52418CA83A1AB9AF67F6C /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -197,6 +248,23 @@ shellPath = /bin/sh; shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; }; + DCEC92BB0E38EF3BEB3563A5 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ diff --git a/ios/Runner.xcworkspace/contents.xcworkspacedata b/ios/Runner.xcworkspace/contents.xcworkspacedata index 1d526a1..21a3cc1 100644 --- a/ios/Runner.xcworkspace/contents.xcworkspacedata +++ b/ios/Runner.xcworkspace/contents.xcworkspacedata @@ -4,4 +4,7 @@ + + diff --git a/lib/ui/screens/weather_screen.dart b/lib/ui/screens/weather_screen.dart index 48a36c1..be4cfdf 100644 --- a/lib/ui/screens/weather_screen.dart +++ b/lib/ui/screens/weather_screen.dart @@ -58,70 +58,71 @@ class _WeatherScreenState extends State { ), ), Expanded( - child: NestedScrollView( - headerSliverBuilder: (context, innerBoxIsScrolled) => [_weatherDetail(context, openWeather)], - body: GridView( - padding: const EdgeInsets.only(left: 10, right: 10, bottom: 20), - gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount( - crossAxisCount: 2, - childAspectRatio: 1.5, - mainAxisSpacing: 10, - crossAxisSpacing: 10, - ), - children: [ - _boxItemWidget( - Icons.wind_power, - "Wind", - "${openWeather.wind.speed.toStringAsFixed(1)} m/s", - "Wind Deg : ${openWeather.wind.deg}°", - ), - _boxItemWidget( - Icons.sunny_snowing, - "Sunrise", - DateFormat.Hm().format(unixToDateTime(openWeather.sys.sunrise) ?? DateTime.now()), - "Sunset will be at : ${DateFormat.Hm().format(unixToDateTime(openWeather.sys.sunset) ?? DateTime.now())}", - ), - _boxItemWidget( - Icons.thermostat, - "Temperature", - "${openWeather.main.temp.toStringAsFixed(0)}°C", - "Feels like : ${openWeather.main.feelsLike.toStringAsFixed(0)}°C", - ), - _boxItemWidget( - Icons.water_drop, - "Humidity", - "${openWeather.main.humidity}%", - "Pressure : ${openWeather.main.pressure} hPa", - ), - _boxItemWidget( - Icons.cloud, - "Clouds", - "${openWeather.clouds.all}%", - "Visibility : ${openWeather.visibility / 1000} km", - ), - - //Conditional rain and snow - if (openWeather.rain != null) + child: ListView( + physics: const BouncingScrollPhysics(), + padding: const EdgeInsets.only(left: 10, right: 10, bottom: 20), + children: [ + _weatherDetail(context, openWeather), + const ColumnDivider(space: 20), + GridView( + shrinkWrap: true, + physics: const NeverScrollableScrollPhysics(), + gridDelegate: const SliverGridDelegateWithFixedCrossAxisCount(crossAxisCount: 2, childAspectRatio: 1.5, mainAxisSpacing: 10, crossAxisSpacing: 10), + children: [ + _boxItemWidget( + Icons.wind_power, + "Wind", + "${openWeather.wind.speed.toStringAsFixed(1)} m/s", + "Wind Deg : ${openWeather.wind.deg}°", + ), + _boxItemWidget( + Icons.sunny_snowing, + "Sunrise", + DateFormat.Hm().format(unixToDateTime(openWeather.sys.sunrise) ?? DateTime.now()), + "Sunset will be at : ${DateFormat.Hm().format(unixToDateTime(openWeather.sys.sunset) ?? DateTime.now())}", + ), + _boxItemWidget( + Icons.thermostat, + "Temperature", + "${openWeather.main.temp.toStringAsFixed(0)}°C", + "Feels like : ${openWeather.main.feelsLike.toStringAsFixed(0)}°C", + ), _boxItemWidget( - Icons.water, - "Rain", - "${openWeather.rain?.the1H ?? 0} mm", + Icons.water_drop, + "Humidity", + "${openWeather.main.humidity}%", + "Pressure : ${openWeather.main.pressure} hPa", ), - if (openWeather.snow != null) _boxItemWidget( - Icons.snowing, - "Snow", - "${openWeather.snow?.the1H ?? 0} mm", + Icons.cloud, + "Clouds", + "${openWeather.clouds.all}%", + "Visibility : ${openWeather.visibility / 1000} km", ), - //Sea level - _boxItemWidget( - Icons.water_outlined, - "Sea Level", - "${openWeather.main.seaLevel} m", - "Ground Level : ${openWeather.main.grndLevel} m", - ), - ]), + //Conditional rain and snow + if (openWeather.rain != null) + _boxItemWidget( + Icons.water, + "Rain", + "${openWeather.rain?.the1H ?? 0} mm", + ), + if (openWeather.snow != null) + _boxItemWidget( + Icons.snowing, + "Snow", + "${openWeather.snow?.the1H ?? 0} mm", + ), + + //Sea level + _boxItemWidget( + Icons.water_outlined, + "Sea Level", + "${openWeather.main.seaLevel} m", + "Ground Level : ${openWeather.main.grndLevel} m", + ), + ]) + ], ), ), ], @@ -160,28 +161,15 @@ class _WeatherScreenState extends State { } Widget _weatherDetail(BuildContext context, OpenWeather openWeather) { - return SliverAppBar( - centerTitle: true, - floating: false, - pinned: true, - elevation: 0, - backgroundColor: Colors.transparent, - expandedHeight: 150, - toolbarHeight: 0, - flexibleSpace: FlexibleSpaceBar( - collapseMode: CollapseMode.none, - background: Container( - padding: const EdgeInsets.symmetric(horizontal: 15), - child: Column(children: [ - Text("${openWeather.main.temp.toStringAsFixed(0)}°", style: Theme.of(context).textTheme.headline2!.copyWith(color: Colors.white)), - const ColumnDivider(space: 3), - Text(openWeather.weather.first.main, style: Theme.of(context).textTheme.bodyText1!.copyWith(color: Colors.white, fontWeight: FontWeight.bold)), - const ColumnDivider(space: 5), - Text("T:${openWeather.main.tempMax.toStringAsFixed(0)}° R:${openWeather.main.tempMin.toStringAsFixed(0)}°", style: Theme.of(context).textTheme.bodyText1!.copyWith(color: Colors.white)), - ]), - ), - centerTitle: true, - ), + return Container( + padding: const EdgeInsets.symmetric(horizontal: 15), + child: Column(children: [ + Text("${openWeather.main.temp.toStringAsFixed(0)}°", style: Theme.of(context).textTheme.headline2!.copyWith(color: Colors.white)), + const ColumnDivider(space: 3), + Text(openWeather.weather.first.main, style: Theme.of(context).textTheme.bodyText1!.copyWith(color: Colors.white, fontWeight: FontWeight.bold)), + const ColumnDivider(space: 5), + Text("T:${openWeather.main.tempMax.toStringAsFixed(0)}° R:${openWeather.main.tempMin.toStringAsFixed(0)}°", style: Theme.of(context).textTheme.bodyText1!.copyWith(color: Colors.white)), + ]), ); } diff --git a/pubspec.yaml b/pubspec.yaml index 2f28db9..02a713b 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: weather description: Weather app CCN Task publish_to: 'none' -version: 1.0.0+1 +version: 1.0.1+1 environment: sdk: '>=2.18.5 <3.0.0'