From d1d7b2cb703639f3acb69c73991a7acacb14e490 Mon Sep 17 00:00:00 2001 From: Yoshi Date: Fri, 28 Apr 2023 20:36:30 +0300 Subject: [PATCH 001/234] added dependencies --- macos/Flutter/GeneratedPluginRegistrant.swift | 4 + pubspec.lock | 82 ++++++++++++++----- pubspec.yaml | 12 ++- 3 files changed, 73 insertions(+), 25 deletions(-) diff --git a/macos/Flutter/GeneratedPluginRegistrant.swift b/macos/Flutter/GeneratedPluginRegistrant.swift index 884167f..c5ca839 100644 --- a/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/macos/Flutter/GeneratedPluginRegistrant.swift @@ -7,6 +7,8 @@ import Foundation import connectivity_plus import dynamic_color +import flutter_local_notifications +import flutter_native_timezone import geolocator_apple import isar_flutter_libs import package_info_plus @@ -16,6 +18,8 @@ import url_launcher_macos func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { ConnectivityPlugin.register(with: registry.registrar(forPlugin: "ConnectivityPlugin")) DynamicColorPlugin.register(with: registry.registrar(forPlugin: "DynamicColorPlugin")) + FlutterLocalNotificationsPlugin.register(with: registry.registrar(forPlugin: "FlutterLocalNotificationsPlugin")) + FlutterNativeTimezonePlugin.register(with: registry.registrar(forPlugin: "FlutterNativeTimezonePlugin")) GeolocatorPlugin.register(with: registry.registrar(forPlugin: "GeolocatorPlugin")) IsarFlutterLibsPlugin.register(with: registry.registrar(forPlugin: "IsarFlutterLibsPlugin")) FLTPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FLTPackageInfoPlusPlugin")) diff --git a/pubspec.lock b/pubspec.lock index 0c197fb..ecc70b3 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -165,10 +165,10 @@ packages: dependency: "direct main" description: name: connectivity_plus - sha256: d73575bb66216738db892f72ba67dc478bd3b5490fbbcf43644b57645eabc822 + sha256: b74247fad72c171381dbe700ca17da24deac637ab6d43c343b42867acb95c991 url: "https://pub.dev" source: hosted - version: "3.0.4" + version: "3.0.6" connectivity_plus_platform_interface: dependency: transitive description: @@ -318,6 +318,30 @@ packages: url: "https://pub.dev" source: hosted version: "2.0.1" + flutter_local_notifications: + dependency: "direct main" + description: + name: flutter_local_notifications + sha256: "67d6f528b4e71606f6ad66d26dee4a1ae653d1f7e5ded4364167c735477b6b86" + url: "https://pub.dev" + source: hosted + version: "14.0.0" + flutter_local_notifications_linux: + dependency: transitive + description: + name: flutter_local_notifications_linux + sha256: "909bb95de05a2e793503a2437146285a2f600cd0b3f826e26b870a334d8586d7" + url: "https://pub.dev" + source: hosted + version: "4.0.0" + flutter_local_notifications_platform_interface: + dependency: transitive + description: + name: flutter_local_notifications_platform_interface + sha256: "63235c42de5b6c99846969a27ad0209c401e6b77b0498939813725b5791c107c" + url: "https://pub.dev" + source: hosted + version: "7.0.0" flutter_localizations: dependency: "direct main" description: flutter @@ -331,6 +355,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.2.19" + flutter_native_timezone: + dependency: "direct main" + description: + name: flutter_native_timezone + sha256: ed7bfb982f036243de1c068e269182a877100c994f05143c8b26a325e28c1b02 + url: "https://pub.dev" + source: hosted + version: "2.0.0" flutter_test: dependency: "direct dev" description: flutter @@ -453,6 +485,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.2.0" + home_widget: + dependency: "direct main" + description: + name: home_widget + sha256: c7a57566606ce702454f074a0b933ee156f05ea6ef1f79f4cb680a171afe59dd + url: "https://pub.dev" + source: hosted + version: "0.2.0+1" html: dependency: transitive description: @@ -497,10 +537,10 @@ packages: dependency: transitive description: name: image - sha256: "483a389d6ccb292b570c31b3a193779b1b0178e7eb571986d9a49904b6861227" + sha256: "73964e3609fb96e01e69b0924b939967c556e46c7ff05db2ea9e31019000f4ef" url: "https://pub.dev" source: hosted - version: "4.0.15" + version: "4.0.16" internet_connection_checker: dependency: "direct main" description: @@ -598,7 +638,7 @@ packages: source: hosted version: "0.12.13" material_color_utilities: - dependency: transitive + dependency: "direct main" description: name: material_color_utilities sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724 @@ -649,10 +689,10 @@ packages: dependency: "direct main" description: name: package_info_plus - sha256: cbff87676c352d97116af6dbea05aa28c4d65eb0f6d5677a520c11a69ca9a24d + sha256: "10259b111176fba5c505b102e3a5b022b51dd97e30522e906d6922c745584745" url: "https://pub.dev" source: hosted - version: "3.1.0" + version: "3.1.2" package_info_plus_platform_interface: dependency: transitive description: @@ -681,10 +721,10 @@ packages: dependency: transitive description: name: path_provider_android - sha256: da97262be945a72270513700a92b39dd2f4a54dad55d061687e2e37a6390366a + sha256: "2cec049d282c7f13c594b4a73976b0b4f2d7a1838a6dd5aaf7bd9719196bee86" url: "https://pub.dev" source: hosted - version: "2.0.25" + version: "2.0.27" path_provider_foundation: dependency: transitive description: @@ -713,10 +753,10 @@ packages: dependency: transitive description: name: path_provider_windows - sha256: f53720498d5a543f9607db4b0e997c4b5438884de25b0f73098cc2671a51b130 + sha256: d3f80b32e83ec208ac95253e0cd4d298e104fbc63cb29c5c69edaed43b0c69d6 url: "https://pub.dev" source: hosted - version: "2.1.5" + version: "2.1.6" petitparser: dependency: transitive description: @@ -785,10 +825,10 @@ packages: dependency: "direct main" description: name: scrollable_positioned_list - sha256: ca7fcaa743db712d4f7b1580526f494d0093c77a721a65705ee51fbeac7a2bd3 + sha256: "45806e0d64aa9dcbf4ced336eabff766dd7ba734014fd71c89bc08241c02bfc5" url: "https://pub.dev" source: hosted - version: "0.3.5" + version: "0.3.6" shelf: dependency: transitive description: @@ -934,10 +974,10 @@ packages: dependency: transitive description: name: url_launcher_android - sha256: a52628068d282d01a07cd86e6ba99e497aa45ce8c91159015b2416907d78e411 + sha256: "22f8db4a72be26e9e3a4aa3f194b1f7afbc76d20ec141f84be1d787db2155cbd" url: "https://pub.dev" source: hosted - version: "6.0.27" + version: "6.0.31" url_launcher_ios: dependency: transitive description: @@ -950,10 +990,10 @@ packages: dependency: transitive description: name: url_launcher_linux - sha256: "206fb8334a700ef7754d6a9ed119e7349bc830448098f21a69bf1b4ed038cabc" + sha256: "207f4ddda99b95b4d4868320a352d374b0b7e05eefad95a4a26f57da413443f5" url: "https://pub.dev" source: hosted - version: "3.0.4" + version: "3.0.5" url_launcher_macos: dependency: transitive description: @@ -982,10 +1022,10 @@ packages: dependency: transitive description: name: url_launcher_windows - sha256: a83ba3607a507758669cfafb03f9de09bf6e6280c14d9b9cb18f013e406dcacd + sha256: "254708f17f7c20a9c8c471f67d86d76d4a3f9c1591aad1e15292008aceb82771" url: "https://pub.dev" source: hosted - version: "3.0.5" + version: "3.0.6" vector_math: dependency: transitive description: @@ -1014,10 +1054,10 @@ packages: dependency: transitive description: name: win32 - sha256: a6f0236dbda0f63aa9a25ad1ff9a9d8a4eaaa5012da0dc59d21afdb1dc361ca4 + sha256: dd8f9344bc305ae2923e3d11a2a911d9a4e2c7dd6fe0ed10626d63211a69676e url: "https://pub.dev" source: hosted - version: "3.1.4" + version: "4.1.3" xdg_directories: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 1f566a1..2991146 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -3,7 +3,7 @@ description: Weather app. publish_to: "none" -version: 1.1.9+20 +version: 1.1.10+21 environment: sdk: ">=2.19.4 <3.0.0" @@ -25,15 +25,19 @@ dependencies: flutter_glow: ^0.3.0 url_launcher: ^6.1.10 dynamic_color: ^1.6.3 + home_widget: ^0.2.0+1 path_provider: ^2.0.14 - package_info_plus: ^3.1.0 - connectivity_plus: ^3.0.4 + package_info_plus: ^3.1.2 + connectivity_plus: ^3.0.6 isar_flutter_libs: ^3.1.0+1 flutter_displaymode: ^0.6.0 lat_lng_to_timezone: ^0.2.0 nested_scroll_views: ^0.0.7 custom_navigation_bar: ^0.8.2 - scrollable_positioned_list: ^0.3.5 + flutter_native_timezone: ^2.0.0 + material_color_utilities: ^0.2.0 + scrollable_positioned_list: ^0.3.6 + flutter_local_notifications: ^14.0.0 internet_connection_checker: ^1.0.0+1 dev_dependencies: From e2d0cc61dd92096ce6f92cbfea4895689c34c9c9 Mon Sep 17 00:00:00 2001 From: Yoshi Date: Sat, 29 Apr 2023 18:15:14 +0300 Subject: [PATCH 002/234] issue #57 && notification --- lib/app/controller/controller.dart | 5 +---- lib/app/services/notification.dart | 35 ++++++++++++++++++++++++++++++ lib/main.dart | 13 +++++++++++ pubspec.lock | 4 ++-- pubspec.yaml | 2 +- 5 files changed, 52 insertions(+), 7 deletions(-) create mode 100644 lib/app/services/notification.dart diff --git a/lib/app/controller/controller.dart b/lib/app/controller/controller.dart index 0ddef76..6094bf3 100644 --- a/lib/app/controller/controller.dart +++ b/lib/app/controller/controller.dart @@ -53,10 +53,7 @@ class LocationController extends GetxController { 'Location permissions are permanently denied, we cannot request permissions.'); } return await Geolocator.getCurrentPosition( - desiredAccuracy: LocationAccuracy.medium, - forceAndroidLocationManager: true, - timeLimit: const Duration(seconds: 30), - ); + desiredAccuracy: LocationAccuracy.high); } Future setLocation() async { diff --git a/lib/app/services/notification.dart b/lib/app/services/notification.dart new file mode 100644 index 0000000..d731a6b --- /dev/null +++ b/lib/app/services/notification.dart @@ -0,0 +1,35 @@ +import 'package:flutter_local_notifications/flutter_local_notifications.dart'; +import 'package:rain/main.dart'; +import 'package:timezone/timezone.dart' as tz; + +class NotificationShow { + Future showNotification( + int id, String title, String body, DateTime? date) async { + flutterLocalNotificationsPlugin + .resolvePlatformSpecificImplementation< + AndroidFlutterLocalNotificationsPlugin>() + ?.requestPermission(); + AndroidNotificationDetails androidNotificationDetails = + const AndroidNotificationDetails( + 'Rain', + 'DARK NIGHT', + priority: Priority.max, + importance: Importance.max, + ); + NotificationDetails notificationDetails = + NotificationDetails(android: androidNotificationDetails); + + var scheduledTime = tz.TZDateTime.from(date!, tz.local); + flutterLocalNotificationsPlugin.zonedSchedule( + id, + title, + body, + scheduledTime, + notificationDetails, + uiLocalNotificationDateInterpretation: + UILocalNotificationDateInterpretation.absoluteTime, + androidScheduleMode: AndroidScheduleMode.exactAllowWhileIdle, + payload: 'notlification-payload', + ); + } +} diff --git a/lib/main.dart b/lib/main.dart index 567add3..e607fc7 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -2,7 +2,9 @@ import 'package:connectivity_plus/connectivity_plus.dart'; import 'package:dynamic_color/dynamic_color.dart'; import 'package:flutter/material.dart'; import 'package:flutter_displaymode/flutter_displaymode.dart'; +import 'package:flutter_local_notifications/flutter_local_notifications.dart'; import 'package:flutter_localizations/flutter_localizations.dart'; +import 'package:flutter_native_timezone/flutter_native_timezone.dart'; import 'package:get/get.dart'; import 'package:internet_connection_checker/internet_connection_checker.dart'; import 'package:isar/isar.dart'; @@ -14,12 +16,16 @@ import 'app/data/weather.dart'; import 'translation/translation.dart'; import 'theme/theme_controller.dart'; import 'package:timezone/data/latest_all.dart' as tz; +import 'package:timezone/timezone.dart' as tz; late Isar isar; late Settings settings; final ValueNotifier> isDeviceConnectedNotifier = ValueNotifier(InternetConnectionChecker().hasConnection); +FlutterLocalNotificationsPlugin flutterLocalNotificationsPlugin = + FlutterLocalNotificationsPlugin(); + void main() async { WidgetsFlutterBinding.ensureInitialized(); await isarInit(); @@ -34,7 +40,14 @@ void main() async { isDeviceConnectedNotifier.value = Future(() => false); } }); + final String timeZoneName = await FlutterNativeTimezone.getLocalTimezone(); + const AndroidInitializationSettings initializationSettingsAndroid = + AndroidInitializationSettings('@mipmap/ic_launcher'); + const InitializationSettings initializationSettings = + InitializationSettings(android: initializationSettingsAndroid); + await flutterLocalNotificationsPlugin.initialize(initializationSettings); tz.initializeTimeZones(); + tz.setLocalLocation(tz.getLocation(timeZoneName)); runApp(MyApp()); } diff --git a/pubspec.lock b/pubspec.lock index ecc70b3..a9ff750 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -322,10 +322,10 @@ packages: dependency: "direct main" description: name: flutter_local_notifications - sha256: "67d6f528b4e71606f6ad66d26dee4a1ae653d1f7e5ded4364167c735477b6b86" + sha256: "2876372952b65ca7f684e698eba22bda1cf581fa071dd30ba2f01900f507d0d1" url: "https://pub.dev" source: hosted - version: "14.0.0" + version: "14.0.0+1" flutter_local_notifications_linux: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 2991146..4211ab5 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -37,7 +37,7 @@ dependencies: flutter_native_timezone: ^2.0.0 material_color_utilities: ^0.2.0 scrollable_positioned_list: ^0.3.6 - flutter_local_notifications: ^14.0.0 + flutter_local_notifications: ^14.0.0+1 internet_connection_checker: ^1.0.0+1 dev_dependencies: From 4a67ddf35aa52497109994414ffcae1f966514bd Mon Sep 17 00:00:00 2001 From: Yoshi Date: Wed, 3 May 2023 23:17:48 +0300 Subject: [PATCH 003/234] issue #49 --- pubspec.lock | 67 +++++++++---------- pubspec.yaml | 6 +- .../flutter/generated_plugin_registrant.cc | 3 - windows/flutter/generated_plugins.cmake | 1 - 4 files changed, 35 insertions(+), 42 deletions(-) diff --git a/pubspec.lock b/pubspec.lock index a9ff750..f7ab047 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -29,10 +29,10 @@ packages: dependency: transitive description: name: args - sha256: "4cab82a83ffef80b262ddedf47a0a8e56ee6fbf7fe21e6e768b02792034dd440" + sha256: c372bb384f273f0c2a8aaaa226dad84dc27c8519a691b888725dec59518ad53a url: "https://pub.dev" source: hosted - version: "2.4.0" + version: "2.4.1" async: dependency: transitive description: @@ -109,10 +109,10 @@ packages: dependency: transitive description: name: built_value - sha256: "31b7c748fd4b9adf8d25d72a4c4a59ef119f12876cf414f94f8af5131d5fa2b0" + sha256: "2f17434bd5d52a26762043d6b43bb53b3acd029b4d9071a329f46d67ef297e6d" url: "https://pub.dev" source: hosted - version: "8.4.4" + version: "8.5.0" characters: dependency: transitive description: @@ -125,10 +125,10 @@ packages: dependency: transitive description: name: checked_yaml - sha256: "3d1505d91afa809d177efd4eed5bb0eb65805097a1463abdd2add076effae311" + sha256: feb6bed21949061731a7a75fc5d2aa727cf160b91af9a3e464c5e3a32e28b5ff url: "https://pub.dev" source: hosted - version: "2.0.2" + version: "2.0.3" cli_util: dependency: transitive description: @@ -416,51 +416,44 @@ packages: geolocator: dependency: "direct main" description: - name: geolocator - sha256: "5c23f3613f50586c0bbb2b8f970240ae66b3bd992088cf60dd5ee2e6f7dde3a8" - url: "https://pub.dev" - source: hosted - version: "9.0.2" + path: geolocator + ref: master + resolved-ref: "13e6dfee4d32ba9572e8b7e6d263ebd7ffc562db" + url: "https://gitlab.com/free2pass/flutter-geolocator-floss.git" + source: git + version: "7.6.2" geolocator_android: dependency: transitive description: name: geolocator_android - sha256: "2ba24690aee0a3e1b6b7bd47c2711a50c874e95e4c758346589d35194adf6d6a" + sha256: dde5cd786a66f29ee74abe60095b4fe99735faa52926dcac1246747a7533cf6b url: "https://pub.dev" source: hosted - version: "4.1.7" + version: "1.0.2" geolocator_apple: dependency: transitive description: name: geolocator_apple - sha256: "22b60ca3b8c0f58e6a9688ff855ee39ab813ca3f0c0609a48d282f6631266f2e" + sha256: "1e8e398cc92151d946a4bbd34e2075885333e42d35ca33e418e7ce7b0a29991e" url: "https://pub.dev" source: hosted - version: "2.2.5" + version: "1.2.2" geolocator_platform_interface: dependency: transitive description: name: geolocator_platform_interface - sha256: af4d69231452f9620718588f41acc4cb58312368716bfff2e92e770b46ce6386 + sha256: "9d6f34a8a4b704d504f34acc5e52d880a7d2caedd99739902d6319179b0336d4" url: "https://pub.dev" source: hosted - version: "4.0.7" + version: "2.3.6" geolocator_web: dependency: transitive description: name: geolocator_web - sha256: f68a122da48fcfff68bbc9846bb0b74ef651afe84a1b1f6ec20939de4d6860e1 + sha256: "0b9e0ec13ce2211085cae0055b3516c975bd6cfe2878a20c8f13611f1a259855" url: "https://pub.dev" source: hosted - version: "2.1.6" - geolocator_windows: - dependency: transitive - description: - name: geolocator_windows - sha256: f5911c88e23f48b598dd506c7c19eff0e001645bdc03bb6fecb9f4549208354d - url: "https://pub.dev" - source: hosted - version: "0.1.1" + version: "2.0.6" get: dependency: "direct main" description: @@ -497,18 +490,18 @@ packages: dependency: transitive description: name: html - sha256: "79d498e6d6761925a34ee5ea8fa6dfef38607781d2fa91e37523474282af55cb" + sha256: "58e3491f7bf0b6a4ea5110c0c688877460d1a6366731155c4a4580e7ded773e8" url: "https://pub.dev" source: hosted - version: "0.15.2" + version: "0.15.3" http: dependency: transitive description: name: http - sha256: "6aa2946395183537c8b880962d935877325d6a09a2867c3970c05c0fed6ac482" + sha256: "5895291c13fa8a3bd82e76d5627f69e0d85ca6a30dcac95c4ea19a5d555879c2" url: "https://pub.dev" source: hosted - version: "0.13.5" + version: "0.13.6" http_multi_server: dependency: transitive description: @@ -601,10 +594,10 @@ packages: dependency: transitive description: name: json_annotation - sha256: c33da08e136c3df0190bd5bbe51ae1df4a7d96e7954d1d7249fea2968a72d317 + sha256: b10a7b2ff83d83c777edba3c6a0f97045ddadd56c944e1a23a3fdf43a1bf4467 url: "https://pub.dev" source: hosted - version: "4.8.0" + version: "4.8.1" lat_lng_to_timezone: dependency: "direct main" description: @@ -833,18 +826,18 @@ packages: dependency: transitive description: name: shelf - sha256: c24a96135a2ccd62c64b69315a14adc5c3419df63b4d7c05832a346fdb73682c + sha256: ad29c505aee705f41a4d8963641f91ac4cee3c8fad5947e033390a7bd8180fa4 url: "https://pub.dev" source: hosted - version: "1.4.0" + version: "1.4.1" shelf_web_socket: dependency: transitive description: name: shelf_web_socket - sha256: a988c0e8d8ffbdb8a28aa7ec8e449c260f3deb808781fe1284d22c5bba7156e8 + sha256: "9ca081be41c60190ebcb4766b2486a7d50261db7bd0f5d9615f2d653637a84c1" url: "https://pub.dev" source: hosted - version: "1.0.3" + version: "1.0.4" shimmer: dependency: "direct main" description: diff --git a/pubspec.yaml b/pubspec.yaml index 4211ab5..2953d37 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -21,7 +21,11 @@ dependencies: iconsax: ^0.0.8 timezone: ^0.9.2 geocoding: ^2.1.0 - geolocator: ^9.0.2 + geolocator: + git: + url: https://gitlab.com/free2pass/flutter-geolocator-floss.git + ref: master + path: geolocator flutter_glow: ^0.3.0 url_launcher: ^6.1.10 dynamic_color: ^1.6.3 diff --git a/windows/flutter/generated_plugin_registrant.cc b/windows/flutter/generated_plugin_registrant.cc index f8a9621..2452ab4 100644 --- a/windows/flutter/generated_plugin_registrant.cc +++ b/windows/flutter/generated_plugin_registrant.cc @@ -8,7 +8,6 @@ #include #include -#include #include #include @@ -17,8 +16,6 @@ void RegisterPlugins(flutter::PluginRegistry* registry) { registry->GetRegistrarForPlugin("ConnectivityPlusWindowsPlugin")); DynamicColorPluginCApiRegisterWithRegistrar( registry->GetRegistrarForPlugin("DynamicColorPluginCApi")); - GeolocatorWindowsRegisterWithRegistrar( - registry->GetRegistrarForPlugin("GeolocatorWindows")); IsarFlutterLibsPluginRegisterWithRegistrar( registry->GetRegistrarForPlugin("IsarFlutterLibsPlugin")); UrlLauncherWindowsRegisterWithRegistrar( diff --git a/windows/flutter/generated_plugins.cmake b/windows/flutter/generated_plugins.cmake index ca34188..79bae17 100644 --- a/windows/flutter/generated_plugins.cmake +++ b/windows/flutter/generated_plugins.cmake @@ -5,7 +5,6 @@ list(APPEND FLUTTER_PLUGIN_LIST connectivity_plus dynamic_color - geolocator_windows isar_flutter_libs url_launcher_windows ) From c54398d6b02452dfa8416dfab32c4c65575f7933 Mon Sep 17 00:00:00 2001 From: Yoshi Date: Sun, 7 May 2023 13:03:24 +0300 Subject: [PATCH 004/234] issue #59, #56, #55 --- lib/app/api/api.dart | 12 +- lib/app/api/daily.dart | 10 + lib/app/controller/controller.dart | 8 + lib/app/data/weather.dart | 12 + lib/app/data/weather.g.dart | 1493 +++++++++++++++-- lib/app/modules/card_weather.dart | 258 ++- lib/app/modules/home.dart | 20 +- lib/app/modules/onboarding.dart | 1 + lib/app/modules/weather.dart | 8 +- lib/app/modules/weather_card.dart | 8 +- lib/app/widgets/card.dart | 21 +- lib/app/widgets/daily_card.dart | 338 ++-- lib/app/widgets/list_daily_card.dart | 75 + lib/app/widgets/weather_daily.dart | 182 +- lib/app/widgets/weather_more.dart | 169 +- lib/theme/theme.dart | 6 +- pubspec.lock | 81 +- pubspec.yaml | 11 +- .../flutter/generated_plugin_registrant.cc | 3 + windows/flutter/generated_plugins.cmake | 1 + 20 files changed, 2064 insertions(+), 653 deletions(-) create mode 100644 lib/app/widgets/list_daily_card.dart diff --git a/lib/app/api/api.dart b/lib/app/api/api.dart index 83108c5..7a5b11a 100644 --- a/lib/app/api/api.dart +++ b/lib/app/api/api.dart @@ -27,7 +27,7 @@ class WeatherAPI { : urlHourly = baseUrlHourly; String baseUrlDaily = - 'latitude=$lat&longitude=$lon&daily=weathercode,temperature_2m_max,temperature_2m_min,apparent_temperature_max,apparent_temperature_min,sunrise,sunset,precipitation_sum,precipitation_probability_max,windspeed_10m_max,windgusts_10m_max&forecast_days=10&timezone=auto'; + 'latitude=$lat&longitude=$lon&daily=weathercode,temperature_2m_max,temperature_2m_min,apparent_temperature_max,apparent_temperature_min,sunrise,sunset,precipitation_sum,precipitation_probability_max,windspeed_10m_max,windgusts_10m_max,uv_index_max,rain_sum,winddirection_10m_dominant&forecast_days=10&timezone=auto'; String urlDaily; settings.degrees == 'fahrenheit' ? urlDaily = '$baseUrlDaily&temperature_unit=fahrenheit' @@ -68,6 +68,10 @@ class WeatherAPI { weatherDataDaily.daily.precipitationProbabilityMax, windspeed10MMax: weatherDataDaily.daily.windspeed10MMax, windgusts10MMax: weatherDataDaily.daily.windgusts10MMax, + uvIndexMax: weatherDataDaily.daily.uvIndexMax, + rainSum: weatherDataDaily.daily.rainSum, + winddirection10MDominant: + weatherDataDaily.daily.winddirection10MDominant, timezone: weatherDataHourly.timezone, timestamp: DateTime.now(), ); @@ -121,7 +125,7 @@ class WeatherAPI { : urlHourly = baseUrlHourly; String baseUrlDaily = - 'latitude=$lat&longitude=$lon&daily=weathercode,temperature_2m_max,temperature_2m_min,apparent_temperature_max,apparent_temperature_min,sunrise,sunset,precipitation_sum,precipitation_probability_max,windspeed_10m_max,windgusts_10m_max&forecast_days=10&timezone=auto'; + 'latitude=$lat&longitude=$lon&daily=weathercode,temperature_2m_max,temperature_2m_min,apparent_temperature_max,apparent_temperature_min,sunrise,sunset,precipitation_sum,precipitation_probability_max,windspeed_10m_max,windgusts_10m_max,uv_index_max,rain_sum,winddirection_10m_dominant&forecast_days=10&timezone=auto'; String urlDaily; settings.degrees == 'fahrenheit' ? urlDaily = '$baseUrlDaily&temperature_unit=fahrenheit' @@ -162,6 +166,10 @@ class WeatherAPI { weatherDataDaily.daily.precipitationProbabilityMax, windspeed10MMax: weatherDataDaily.daily.windspeed10MMax, windgusts10MMax: weatherDataDaily.daily.windgusts10MMax, + uvIndexMax: weatherDataDaily.daily.uvIndexMax, + rainSum: weatherDataDaily.daily.rainSum, + winddirection10MDominant: + weatherDataDaily.daily.winddirection10MDominant, lat: lat, lon: lon, city: city, diff --git a/lib/app/api/daily.dart b/lib/app/api/daily.dart index f6bd49f..ae396db 100644 --- a/lib/app/api/daily.dart +++ b/lib/app/api/daily.dart @@ -25,6 +25,9 @@ class Daily { this.precipitationProbabilityMax, this.windspeed10MMax, this.windgusts10MMax, + this.uvIndexMax, + this.rainSum, + this.winddirection10MDominant, }); List? time; @@ -39,6 +42,9 @@ class Daily { List? precipitationProbabilityMax; List? windspeed10MMax; List? windgusts10MMax; + List? uvIndexMax; + List? rainSum; + List? winddirection10MDominant; factory Daily.fromJson(Map json) => Daily( time: List.from(json["time"].map((x) => DateTime.parse(x))), @@ -61,5 +67,9 @@ class Daily { List.from(json["windspeed_10m_max"].map((x) => x)), windgusts10MMax: List.from(json["windgusts_10m_max"].map((x) => x)), + uvIndexMax: List.from(json["uv_index_max"].map((x) => x)), + rainSum: List.from(json["rain_sum"].map((x) => x)), + winddirection10MDominant: + List.from(json["winddirection_10m_dominant"].map((x) => x)), ); } diff --git a/lib/app/controller/controller.dart b/lib/app/controller/controller.dart index 6094bf3..bc6310e 100644 --- a/lib/app/controller/controller.dart +++ b/lib/app/controller/controller.dart @@ -305,6 +305,10 @@ class LocationController extends GetxController { _weatherCard.value.precipitationProbabilityMax; element.windspeed10MMax = _weatherCard.value.windspeed10MMax; element.windgusts10MMax = _weatherCard.value.windgusts10MMax; + element.uvIndexMax = _weatherCard.value.uvIndexMax; + element.rainSum = _weatherCard.value.rainSum; + element.winddirection10MDominant = + _weatherCard.value.winddirection10MDominant; element.timestamp = DateTime.now(); await isar.weatherCards.put(element); } @@ -350,6 +354,10 @@ class LocationController extends GetxController { _weatherCard.value.precipitationProbabilityMax; weatherCard.windspeed10MMax = _weatherCard.value.windspeed10MMax; weatherCard.windgusts10MMax = _weatherCard.value.windgusts10MMax; + weatherCard.uvIndexMax = _weatherCard.value.uvIndexMax; + weatherCard.rainSum = _weatherCard.value.rainSum; + weatherCard.winddirection10MDominant = + _weatherCard.value.winddirection10MDominant; weatherCard.timestamp = DateTime.now(); await isar.weatherCards.put(weatherCard); }); diff --git a/lib/app/data/weather.dart b/lib/app/data/weather.dart index acb68d3..22e8658 100644 --- a/lib/app/data/weather.dart +++ b/lib/app/data/weather.dart @@ -45,6 +45,9 @@ class MainWeatherCache { List? precipitationProbabilityMax; List? windspeed10MMax; List? windgusts10MMax; + List? uvIndexMax; + List? rainSum; + List? winddirection10MDominant; String? timezone; DateTime? timestamp; @@ -76,6 +79,9 @@ class MainWeatherCache { this.precipitationProbabilityMax, this.windspeed10MMax, this.windgusts10MMax, + this.uvIndexMax, + this.rainSum, + this.winddirection10MDominant, this.timezone, this.timestamp, }); @@ -127,6 +133,9 @@ class WeatherCard { List? precipitationProbabilityMax; List? windspeed10MMax; List? windgusts10MMax; + List? uvIndexMax; + List? rainSum; + List? winddirection10MDominant; double? lat; double? lon; String? city; @@ -162,6 +171,9 @@ class WeatherCard { this.precipitationProbabilityMax, this.windspeed10MMax, this.windgusts10MMax, + this.uvIndexMax, + this.rainSum, + this.winddirection10MDominant, this.lat, this.lon, this.city, diff --git a/lib/app/data/weather.g.dart b/lib/app/data/weather.g.dart index d71b28b..1799513 100644 --- a/lib/app/data/weather.g.dart +++ b/lib/app/data/weather.g.dart @@ -1132,103 +1132,118 @@ const MainWeatherCacheSchema = CollectionSchema( name: r'rain', type: IsarType.doubleList, ), - r'relativehumidity2M': PropertySchema( + r'rainSum': PropertySchema( id: 9, + name: r'rainSum', + type: IsarType.doubleList, + ), + r'relativehumidity2M': PropertySchema( + id: 10, name: r'relativehumidity2M', type: IsarType.longList, ), r'sunrise': PropertySchema( - id: 10, + id: 11, name: r'sunrise', type: IsarType.stringList, ), r'sunset': PropertySchema( - id: 11, + id: 12, name: r'sunset', type: IsarType.stringList, ), r'surfacePressure': PropertySchema( - id: 12, + id: 13, name: r'surfacePressure', type: IsarType.doubleList, ), r'temperature2M': PropertySchema( - id: 13, + id: 14, name: r'temperature2M', type: IsarType.doubleList, ), r'temperature2MMax': PropertySchema( - id: 14, + id: 15, name: r'temperature2MMax', type: IsarType.doubleList, ), r'temperature2MMin': PropertySchema( - id: 15, + id: 16, name: r'temperature2MMin', type: IsarType.doubleList, ), r'time': PropertySchema( - id: 16, + id: 17, name: r'time', type: IsarType.stringList, ), r'timeDaily': PropertySchema( - id: 17, + id: 18, name: r'timeDaily', type: IsarType.dateTimeList, ), r'timestamp': PropertySchema( - id: 18, + id: 19, name: r'timestamp', type: IsarType.dateTime, ), r'timezone': PropertySchema( - id: 19, + id: 20, name: r'timezone', type: IsarType.string, ), r'uvIndex': PropertySchema( - id: 20, + id: 21, name: r'uvIndex', type: IsarType.doubleList, ), + r'uvIndexMax': PropertySchema( + id: 22, + name: r'uvIndexMax', + type: IsarType.doubleList, + ), r'visibility': PropertySchema( - id: 21, + id: 23, name: r'visibility', type: IsarType.doubleList, ), r'weathercode': PropertySchema( - id: 22, + id: 24, name: r'weathercode', type: IsarType.longList, ), r'weathercodeDaily': PropertySchema( - id: 23, + id: 25, name: r'weathercodeDaily', type: IsarType.longList, ), r'winddirection10M': PropertySchema( - id: 24, + id: 26, name: r'winddirection10M', type: IsarType.longList, ), + r'winddirection10MDominant': PropertySchema( + id: 27, + name: r'winddirection10MDominant', + type: IsarType.longList, + ), r'windgusts10M': PropertySchema( - id: 25, + id: 28, name: r'windgusts10M', type: IsarType.doubleList, ), r'windgusts10MMax': PropertySchema( - id: 26, + id: 29, name: r'windgusts10MMax', type: IsarType.doubleList, ), r'windspeed10M': PropertySchema( - id: 27, + id: 30, name: r'windspeed10M', type: IsarType.doubleList, ), r'windspeed10MMax': PropertySchema( - id: 28, + id: 31, name: r'windspeed10MMax', type: IsarType.doubleList, ) @@ -1307,6 +1322,12 @@ int _mainWeatherCacheEstimateSize( bytesCount += 3 + value.length * 8; } } + { + final value = object.rainSum; + if (value != null) { + bytesCount += 3 + value.length * 8; + } + } { final value = object.relativehumidity2M; if (value != null) { @@ -1391,6 +1412,12 @@ int _mainWeatherCacheEstimateSize( bytesCount += 3 + value.length * 8; } } + { + final value = object.uvIndexMax; + if (value != null) { + bytesCount += 3 + value.length * 8; + } + } { final value = object.visibility; if (value != null) { @@ -1415,6 +1442,12 @@ int _mainWeatherCacheEstimateSize( bytesCount += 3 + value.length * 8; } } + { + final value = object.winddirection10MDominant; + if (value != null) { + bytesCount += 3 + value.length * 8; + } + } { final value = object.windgusts10M; if (value != null) { @@ -1457,26 +1490,29 @@ void _mainWeatherCacheSerialize( writer.writeLongList(offsets[6], object.precipitationProbabilityMax); writer.writeDoubleList(offsets[7], object.precipitationSum); writer.writeDoubleList(offsets[8], object.rain); - writer.writeLongList(offsets[9], object.relativehumidity2M); - writer.writeStringList(offsets[10], object.sunrise); - writer.writeStringList(offsets[11], object.sunset); - writer.writeDoubleList(offsets[12], object.surfacePressure); - writer.writeDoubleList(offsets[13], object.temperature2M); - writer.writeDoubleList(offsets[14], object.temperature2MMax); - writer.writeDoubleList(offsets[15], object.temperature2MMin); - writer.writeStringList(offsets[16], object.time); - writer.writeDateTimeList(offsets[17], object.timeDaily); - writer.writeDateTime(offsets[18], object.timestamp); - writer.writeString(offsets[19], object.timezone); - writer.writeDoubleList(offsets[20], object.uvIndex); - writer.writeDoubleList(offsets[21], object.visibility); - writer.writeLongList(offsets[22], object.weathercode); - writer.writeLongList(offsets[23], object.weathercodeDaily); - writer.writeLongList(offsets[24], object.winddirection10M); - writer.writeDoubleList(offsets[25], object.windgusts10M); - writer.writeDoubleList(offsets[26], object.windgusts10MMax); - writer.writeDoubleList(offsets[27], object.windspeed10M); - writer.writeDoubleList(offsets[28], object.windspeed10MMax); + writer.writeDoubleList(offsets[9], object.rainSum); + writer.writeLongList(offsets[10], object.relativehumidity2M); + writer.writeStringList(offsets[11], object.sunrise); + writer.writeStringList(offsets[12], object.sunset); + writer.writeDoubleList(offsets[13], object.surfacePressure); + writer.writeDoubleList(offsets[14], object.temperature2M); + writer.writeDoubleList(offsets[15], object.temperature2MMax); + writer.writeDoubleList(offsets[16], object.temperature2MMin); + writer.writeStringList(offsets[17], object.time); + writer.writeDateTimeList(offsets[18], object.timeDaily); + writer.writeDateTime(offsets[19], object.timestamp); + writer.writeString(offsets[20], object.timezone); + writer.writeDoubleList(offsets[21], object.uvIndex); + writer.writeDoubleList(offsets[22], object.uvIndexMax); + writer.writeDoubleList(offsets[23], object.visibility); + writer.writeLongList(offsets[24], object.weathercode); + writer.writeLongList(offsets[25], object.weathercodeDaily); + writer.writeLongList(offsets[26], object.winddirection10M); + writer.writeLongList(offsets[27], object.winddirection10MDominant); + writer.writeDoubleList(offsets[28], object.windgusts10M); + writer.writeDoubleList(offsets[29], object.windgusts10MMax); + writer.writeDoubleList(offsets[30], object.windspeed10M); + writer.writeDoubleList(offsets[31], object.windspeed10MMax); } MainWeatherCache _mainWeatherCacheDeserialize( @@ -1495,26 +1531,29 @@ MainWeatherCache _mainWeatherCacheDeserialize( precipitationProbabilityMax: reader.readLongList(offsets[6]), precipitationSum: reader.readDoubleList(offsets[7]), rain: reader.readDoubleList(offsets[8]), - relativehumidity2M: reader.readLongList(offsets[9]), - sunrise: reader.readStringList(offsets[10]), - sunset: reader.readStringList(offsets[11]), - surfacePressure: reader.readDoubleList(offsets[12]), - temperature2M: reader.readDoubleList(offsets[13]), - temperature2MMax: reader.readDoubleList(offsets[14]), - temperature2MMin: reader.readDoubleList(offsets[15]), - time: reader.readStringList(offsets[16]), - timeDaily: reader.readDateTimeList(offsets[17]), - timestamp: reader.readDateTimeOrNull(offsets[18]), - timezone: reader.readStringOrNull(offsets[19]), - uvIndex: reader.readDoubleList(offsets[20]), - visibility: reader.readDoubleList(offsets[21]), - weathercode: reader.readLongList(offsets[22]), - weathercodeDaily: reader.readLongList(offsets[23]), - winddirection10M: reader.readLongList(offsets[24]), - windgusts10M: reader.readDoubleList(offsets[25]), - windgusts10MMax: reader.readDoubleList(offsets[26]), - windspeed10M: reader.readDoubleList(offsets[27]), - windspeed10MMax: reader.readDoubleList(offsets[28]), + rainSum: reader.readDoubleList(offsets[9]), + relativehumidity2M: reader.readLongList(offsets[10]), + sunrise: reader.readStringList(offsets[11]), + sunset: reader.readStringList(offsets[12]), + surfacePressure: reader.readDoubleList(offsets[13]), + temperature2M: reader.readDoubleList(offsets[14]), + temperature2MMax: reader.readDoubleList(offsets[15]), + temperature2MMin: reader.readDoubleList(offsets[16]), + time: reader.readStringList(offsets[17]), + timeDaily: reader.readDateTimeList(offsets[18]), + timestamp: reader.readDateTimeOrNull(offsets[19]), + timezone: reader.readStringOrNull(offsets[20]), + uvIndex: reader.readDoubleList(offsets[21]), + uvIndexMax: reader.readDoubleList(offsets[22]), + visibility: reader.readDoubleList(offsets[23]), + weathercode: reader.readLongList(offsets[24]), + weathercodeDaily: reader.readLongList(offsets[25]), + winddirection10M: reader.readLongList(offsets[26]), + winddirection10MDominant: reader.readLongList(offsets[27]), + windgusts10M: reader.readDoubleList(offsets[28]), + windgusts10MMax: reader.readDoubleList(offsets[29]), + windspeed10M: reader.readDoubleList(offsets[30]), + windspeed10MMax: reader.readDoubleList(offsets[31]), ); object.id = id; return object; @@ -1546,13 +1585,13 @@ P _mainWeatherCacheDeserializeProp

( case 8: return (reader.readDoubleList(offset)) as P; case 9: - return (reader.readLongList(offset)) as P; + return (reader.readDoubleList(offset)) as P; case 10: - return (reader.readStringList(offset)) as P; + return (reader.readLongList(offset)) as P; case 11: return (reader.readStringList(offset)) as P; case 12: - return (reader.readDoubleList(offset)) as P; + return (reader.readStringList(offset)) as P; case 13: return (reader.readDoubleList(offset)) as P; case 14: @@ -1560,31 +1599,37 @@ P _mainWeatherCacheDeserializeProp

( case 15: return (reader.readDoubleList(offset)) as P; case 16: - return (reader.readStringList(offset)) as P; - case 17: - return (reader.readDateTimeList(offset)) as P; - case 18: - return (reader.readDateTimeOrNull(offset)) as P; - case 19: - return (reader.readStringOrNull(offset)) as P; - case 20: return (reader.readDoubleList(offset)) as P; + case 17: + return (reader.readStringList(offset)) as P; + case 18: + return (reader.readDateTimeList(offset)) as P; + case 19: + return (reader.readDateTimeOrNull(offset)) as P; + case 20: + return (reader.readStringOrNull(offset)) as P; case 21: return (reader.readDoubleList(offset)) as P; case 22: - return (reader.readLongList(offset)) as P; + return (reader.readDoubleList(offset)) as P; case 23: - return (reader.readLongList(offset)) as P; + return (reader.readDoubleList(offset)) as P; case 24: return (reader.readLongList(offset)) as P; case 25: - return (reader.readDoubleList(offset)) as P; + return (reader.readLongList(offset)) as P; case 26: - return (reader.readDoubleList(offset)) as P; + return (reader.readLongList(offset)) as P; case 27: - return (reader.readDoubleList(offset)) as P; + return (reader.readLongList(offset)) as P; case 28: return (reader.readDoubleList(offset)) as P; + case 29: + return (reader.readDoubleList(offset)) as P; + case 30: + return (reader.readDoubleList(offset)) as P; + case 31: + return (reader.readDoubleList(offset)) as P; default: throw IsarError('Unknown property with id $propertyId'); } @@ -3277,6 +3322,179 @@ extension MainWeatherCacheQueryFilter }); } + QueryBuilder + rainSumIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNull( + property: r'rainSum', + )); + }); + } + + QueryBuilder + rainSumIsNotNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNotNull( + property: r'rainSum', + )); + }); + } + + QueryBuilder + rainSumElementEqualTo( + double value, { + double epsilon = Query.epsilon, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'rainSum', + value: value, + epsilon: epsilon, + )); + }); + } + + QueryBuilder + rainSumElementGreaterThan( + double value, { + bool include = false, + double epsilon = Query.epsilon, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + include: include, + property: r'rainSum', + value: value, + epsilon: epsilon, + )); + }); + } + + QueryBuilder + rainSumElementLessThan( + double value, { + bool include = false, + double epsilon = Query.epsilon, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.lessThan( + include: include, + property: r'rainSum', + value: value, + epsilon: epsilon, + )); + }); + } + + QueryBuilder + rainSumElementBetween( + double lower, + double upper, { + bool includeLower = true, + bool includeUpper = true, + double epsilon = Query.epsilon, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.between( + property: r'rainSum', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + epsilon: epsilon, + )); + }); + } + + QueryBuilder + rainSumLengthEqualTo(int length) { + return QueryBuilder.apply(this, (query) { + return query.listLength( + r'rainSum', + length, + true, + length, + true, + ); + }); + } + + QueryBuilder + rainSumIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.listLength( + r'rainSum', + 0, + true, + 0, + true, + ); + }); + } + + QueryBuilder + rainSumIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.listLength( + r'rainSum', + 0, + false, + 999999, + true, + ); + }); + } + + QueryBuilder + rainSumLengthLessThan( + int length, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.listLength( + r'rainSum', + 0, + true, + length, + include, + ); + }); + } + + QueryBuilder + rainSumLengthGreaterThan( + int length, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.listLength( + r'rainSum', + length, + include, + 999999, + true, + ); + }); + } + + QueryBuilder + rainSumLengthBetween( + int lower, + int upper, { + bool includeLower = true, + bool includeUpper = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.listLength( + r'rainSum', + lower, + includeLower, + upper, + includeUpper, + ); + }); + } + QueryBuilder relativehumidity2MIsNull() { return QueryBuilder.apply(this, (query) { @@ -5425,6 +5643,179 @@ extension MainWeatherCacheQueryFilter }); } + QueryBuilder + uvIndexMaxIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNull( + property: r'uvIndexMax', + )); + }); + } + + QueryBuilder + uvIndexMaxIsNotNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNotNull( + property: r'uvIndexMax', + )); + }); + } + + QueryBuilder + uvIndexMaxElementEqualTo( + double value, { + double epsilon = Query.epsilon, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'uvIndexMax', + value: value, + epsilon: epsilon, + )); + }); + } + + QueryBuilder + uvIndexMaxElementGreaterThan( + double value, { + bool include = false, + double epsilon = Query.epsilon, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + include: include, + property: r'uvIndexMax', + value: value, + epsilon: epsilon, + )); + }); + } + + QueryBuilder + uvIndexMaxElementLessThan( + double value, { + bool include = false, + double epsilon = Query.epsilon, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.lessThan( + include: include, + property: r'uvIndexMax', + value: value, + epsilon: epsilon, + )); + }); + } + + QueryBuilder + uvIndexMaxElementBetween( + double lower, + double upper, { + bool includeLower = true, + bool includeUpper = true, + double epsilon = Query.epsilon, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.between( + property: r'uvIndexMax', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + epsilon: epsilon, + )); + }); + } + + QueryBuilder + uvIndexMaxLengthEqualTo(int length) { + return QueryBuilder.apply(this, (query) { + return query.listLength( + r'uvIndexMax', + length, + true, + length, + true, + ); + }); + } + + QueryBuilder + uvIndexMaxIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.listLength( + r'uvIndexMax', + 0, + true, + 0, + true, + ); + }); + } + + QueryBuilder + uvIndexMaxIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.listLength( + r'uvIndexMax', + 0, + false, + 999999, + true, + ); + }); + } + + QueryBuilder + uvIndexMaxLengthLessThan( + int length, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.listLength( + r'uvIndexMax', + 0, + true, + length, + include, + ); + }); + } + + QueryBuilder + uvIndexMaxLengthGreaterThan( + int length, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.listLength( + r'uvIndexMax', + length, + include, + 999999, + true, + ); + }); + } + + QueryBuilder + uvIndexMaxLengthBetween( + int lower, + int upper, { + bool includeLower = true, + bool includeUpper = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.listLength( + r'uvIndexMax', + lower, + includeLower, + upper, + includeUpper, + ); + }); + } + QueryBuilder visibilityIsNull() { return QueryBuilder.apply(this, (query) { @@ -6087,6 +6478,169 @@ extension MainWeatherCacheQueryFilter }); } + QueryBuilder + winddirection10MDominantIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNull( + property: r'winddirection10MDominant', + )); + }); + } + + QueryBuilder + winddirection10MDominantIsNotNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNotNull( + property: r'winddirection10MDominant', + )); + }); + } + + QueryBuilder + winddirection10MDominantElementEqualTo(int value) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'winddirection10MDominant', + value: value, + )); + }); + } + + QueryBuilder + winddirection10MDominantElementGreaterThan( + int value, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + include: include, + property: r'winddirection10MDominant', + value: value, + )); + }); + } + + QueryBuilder + winddirection10MDominantElementLessThan( + int value, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.lessThan( + include: include, + property: r'winddirection10MDominant', + value: value, + )); + }); + } + + QueryBuilder + winddirection10MDominantElementBetween( + int lower, + int upper, { + bool includeLower = true, + bool includeUpper = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.between( + property: r'winddirection10MDominant', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + )); + }); + } + + QueryBuilder + winddirection10MDominantLengthEqualTo(int length) { + return QueryBuilder.apply(this, (query) { + return query.listLength( + r'winddirection10MDominant', + length, + true, + length, + true, + ); + }); + } + + QueryBuilder + winddirection10MDominantIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.listLength( + r'winddirection10MDominant', + 0, + true, + 0, + true, + ); + }); + } + + QueryBuilder + winddirection10MDominantIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.listLength( + r'winddirection10MDominant', + 0, + false, + 999999, + true, + ); + }); + } + + QueryBuilder + winddirection10MDominantLengthLessThan( + int length, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.listLength( + r'winddirection10MDominant', + 0, + true, + length, + include, + ); + }); + } + + QueryBuilder + winddirection10MDominantLengthGreaterThan( + int length, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.listLength( + r'winddirection10MDominant', + length, + include, + 999999, + true, + ); + }); + } + + QueryBuilder + winddirection10MDominantLengthBetween( + int lower, + int upper, { + bool includeLower = true, + bool includeUpper = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.listLength( + r'winddirection10MDominant', + lower, + includeLower, + upper, + includeUpper, + ); + }); + } + QueryBuilder windgusts10MIsNull() { return QueryBuilder.apply(this, (query) { @@ -6925,6 +7479,13 @@ extension MainWeatherCacheQueryWhereDistinct }); } + QueryBuilder + distinctByRainSum() { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(r'rainSum'); + }); + } + QueryBuilder distinctByRelativehumidity2M() { return QueryBuilder.apply(this, (query) { @@ -7008,6 +7569,13 @@ extension MainWeatherCacheQueryWhereDistinct }); } + QueryBuilder + distinctByUvIndexMax() { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(r'uvIndexMax'); + }); + } + QueryBuilder distinctByVisibility() { return QueryBuilder.apply(this, (query) { @@ -7036,6 +7604,13 @@ extension MainWeatherCacheQueryWhereDistinct }); } + QueryBuilder + distinctByWinddirection10MDominant() { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(r'winddirection10MDominant'); + }); + } + QueryBuilder distinctByWindgusts10M() { return QueryBuilder.apply(this, (query) { @@ -7136,6 +7711,13 @@ extension MainWeatherCacheQueryProperty }); } + QueryBuilder?, QQueryOperations> + rainSumProperty() { + return QueryBuilder.apply(this, (query) { + return query.addPropertyName(r'rainSum'); + }); + } + QueryBuilder?, QQueryOperations> relativehumidity2MProperty() { return QueryBuilder.apply(this, (query) { @@ -7219,6 +7801,13 @@ extension MainWeatherCacheQueryProperty }); } + QueryBuilder?, QQueryOperations> + uvIndexMaxProperty() { + return QueryBuilder.apply(this, (query) { + return query.addPropertyName(r'uvIndexMax'); + }); + } + QueryBuilder?, QQueryOperations> visibilityProperty() { return QueryBuilder.apply(this, (query) { @@ -7247,6 +7836,13 @@ extension MainWeatherCacheQueryProperty }); } + QueryBuilder?, QQueryOperations> + winddirection10MDominantProperty() { + return QueryBuilder.apply(this, (query) { + return query.addPropertyName(r'winddirection10MDominant'); + }); + } + QueryBuilder?, QQueryOperations> windgusts10MProperty() { return QueryBuilder.apply(this, (query) { @@ -8271,103 +8867,118 @@ const WeatherCardSchema = CollectionSchema( name: r'rain', type: IsarType.doubleList, ), - r'relativehumidity2M': PropertySchema( + r'rainSum': PropertySchema( id: 13, + name: r'rainSum', + type: IsarType.doubleList, + ), + r'relativehumidity2M': PropertySchema( + id: 14, name: r'relativehumidity2M', type: IsarType.longList, ), r'sunrise': PropertySchema( - id: 14, + id: 15, name: r'sunrise', type: IsarType.stringList, ), r'sunset': PropertySchema( - id: 15, + id: 16, name: r'sunset', type: IsarType.stringList, ), r'surfacePressure': PropertySchema( - id: 16, + id: 17, name: r'surfacePressure', type: IsarType.doubleList, ), r'temperature2M': PropertySchema( - id: 17, + id: 18, name: r'temperature2M', type: IsarType.doubleList, ), r'temperature2MMax': PropertySchema( - id: 18, + id: 19, name: r'temperature2MMax', type: IsarType.doubleList, ), r'temperature2MMin': PropertySchema( - id: 19, + id: 20, name: r'temperature2MMin', type: IsarType.doubleList, ), r'time': PropertySchema( - id: 20, + id: 21, name: r'time', type: IsarType.stringList, ), r'timeDaily': PropertySchema( - id: 21, + id: 22, name: r'timeDaily', type: IsarType.dateTimeList, ), r'timestamp': PropertySchema( - id: 22, + id: 23, name: r'timestamp', type: IsarType.dateTime, ), r'timezone': PropertySchema( - id: 23, + id: 24, name: r'timezone', type: IsarType.string, ), r'uvIndex': PropertySchema( - id: 24, + id: 25, name: r'uvIndex', type: IsarType.doubleList, ), + r'uvIndexMax': PropertySchema( + id: 26, + name: r'uvIndexMax', + type: IsarType.doubleList, + ), r'visibility': PropertySchema( - id: 25, + id: 27, name: r'visibility', type: IsarType.doubleList, ), r'weathercode': PropertySchema( - id: 26, + id: 28, name: r'weathercode', type: IsarType.longList, ), r'weathercodeDaily': PropertySchema( - id: 27, + id: 29, name: r'weathercodeDaily', type: IsarType.longList, ), r'winddirection10M': PropertySchema( - id: 28, + id: 30, name: r'winddirection10M', type: IsarType.longList, ), + r'winddirection10MDominant': PropertySchema( + id: 31, + name: r'winddirection10MDominant', + type: IsarType.longList, + ), r'windgusts10M': PropertySchema( - id: 29, + id: 32, name: r'windgusts10M', type: IsarType.doubleList, ), r'windgusts10MMax': PropertySchema( - id: 30, + id: 33, name: r'windgusts10MMax', type: IsarType.doubleList, ), r'windspeed10M': PropertySchema( - id: 31, + id: 34, name: r'windspeed10M', type: IsarType.doubleList, ), r'windspeed10MMax': PropertySchema( - id: 32, + id: 35, name: r'windspeed10MMax', type: IsarType.doubleList, ) @@ -8458,6 +9069,12 @@ int _weatherCardEstimateSize( bytesCount += 3 + value.length * 8; } } + { + final value = object.rainSum; + if (value != null) { + bytesCount += 3 + value.length * 8; + } + } { final value = object.relativehumidity2M; if (value != null) { @@ -8542,6 +9159,12 @@ int _weatherCardEstimateSize( bytesCount += 3 + value.length * 8; } } + { + final value = object.uvIndexMax; + if (value != null) { + bytesCount += 3 + value.length * 8; + } + } { final value = object.visibility; if (value != null) { @@ -8566,6 +9189,12 @@ int _weatherCardEstimateSize( bytesCount += 3 + value.length * 8; } } + { + final value = object.winddirection10MDominant; + if (value != null) { + bytesCount += 3 + value.length * 8; + } + } { final value = object.windgusts10M; if (value != null) { @@ -8612,26 +9241,29 @@ void _weatherCardSerialize( writer.writeLongList(offsets[10], object.precipitationProbabilityMax); writer.writeDoubleList(offsets[11], object.precipitationSum); writer.writeDoubleList(offsets[12], object.rain); - writer.writeLongList(offsets[13], object.relativehumidity2M); - writer.writeStringList(offsets[14], object.sunrise); - writer.writeStringList(offsets[15], object.sunset); - writer.writeDoubleList(offsets[16], object.surfacePressure); - writer.writeDoubleList(offsets[17], object.temperature2M); - writer.writeDoubleList(offsets[18], object.temperature2MMax); - writer.writeDoubleList(offsets[19], object.temperature2MMin); - writer.writeStringList(offsets[20], object.time); - writer.writeDateTimeList(offsets[21], object.timeDaily); - writer.writeDateTime(offsets[22], object.timestamp); - writer.writeString(offsets[23], object.timezone); - writer.writeDoubleList(offsets[24], object.uvIndex); - writer.writeDoubleList(offsets[25], object.visibility); - writer.writeLongList(offsets[26], object.weathercode); - writer.writeLongList(offsets[27], object.weathercodeDaily); - writer.writeLongList(offsets[28], object.winddirection10M); - writer.writeDoubleList(offsets[29], object.windgusts10M); - writer.writeDoubleList(offsets[30], object.windgusts10MMax); - writer.writeDoubleList(offsets[31], object.windspeed10M); - writer.writeDoubleList(offsets[32], object.windspeed10MMax); + writer.writeDoubleList(offsets[13], object.rainSum); + writer.writeLongList(offsets[14], object.relativehumidity2M); + writer.writeStringList(offsets[15], object.sunrise); + writer.writeStringList(offsets[16], object.sunset); + writer.writeDoubleList(offsets[17], object.surfacePressure); + writer.writeDoubleList(offsets[18], object.temperature2M); + writer.writeDoubleList(offsets[19], object.temperature2MMax); + writer.writeDoubleList(offsets[20], object.temperature2MMin); + writer.writeStringList(offsets[21], object.time); + writer.writeDateTimeList(offsets[22], object.timeDaily); + writer.writeDateTime(offsets[23], object.timestamp); + writer.writeString(offsets[24], object.timezone); + writer.writeDoubleList(offsets[25], object.uvIndex); + writer.writeDoubleList(offsets[26], object.uvIndexMax); + writer.writeDoubleList(offsets[27], object.visibility); + writer.writeLongList(offsets[28], object.weathercode); + writer.writeLongList(offsets[29], object.weathercodeDaily); + writer.writeLongList(offsets[30], object.winddirection10M); + writer.writeLongList(offsets[31], object.winddirection10MDominant); + writer.writeDoubleList(offsets[32], object.windgusts10M); + writer.writeDoubleList(offsets[33], object.windgusts10MMax); + writer.writeDoubleList(offsets[34], object.windspeed10M); + writer.writeDoubleList(offsets[35], object.windspeed10MMax); } WeatherCard _weatherCardDeserialize( @@ -8654,26 +9286,29 @@ WeatherCard _weatherCardDeserialize( precipitationProbabilityMax: reader.readLongList(offsets[10]), precipitationSum: reader.readDoubleList(offsets[11]), rain: reader.readDoubleList(offsets[12]), - relativehumidity2M: reader.readLongList(offsets[13]), - sunrise: reader.readStringList(offsets[14]), - sunset: reader.readStringList(offsets[15]), - surfacePressure: reader.readDoubleList(offsets[16]), - temperature2M: reader.readDoubleList(offsets[17]), - temperature2MMax: reader.readDoubleList(offsets[18]), - temperature2MMin: reader.readDoubleList(offsets[19]), - time: reader.readStringList(offsets[20]), - timeDaily: reader.readDateTimeList(offsets[21]), - timestamp: reader.readDateTimeOrNull(offsets[22]), - timezone: reader.readStringOrNull(offsets[23]), - uvIndex: reader.readDoubleList(offsets[24]), - visibility: reader.readDoubleList(offsets[25]), - weathercode: reader.readLongList(offsets[26]), - weathercodeDaily: reader.readLongList(offsets[27]), - winddirection10M: reader.readLongList(offsets[28]), - windgusts10M: reader.readDoubleList(offsets[29]), - windgusts10MMax: reader.readDoubleList(offsets[30]), - windspeed10M: reader.readDoubleList(offsets[31]), - windspeed10MMax: reader.readDoubleList(offsets[32]), + rainSum: reader.readDoubleList(offsets[13]), + relativehumidity2M: reader.readLongList(offsets[14]), + sunrise: reader.readStringList(offsets[15]), + sunset: reader.readStringList(offsets[16]), + surfacePressure: reader.readDoubleList(offsets[17]), + temperature2M: reader.readDoubleList(offsets[18]), + temperature2MMax: reader.readDoubleList(offsets[19]), + temperature2MMin: reader.readDoubleList(offsets[20]), + time: reader.readStringList(offsets[21]), + timeDaily: reader.readDateTimeList(offsets[22]), + timestamp: reader.readDateTimeOrNull(offsets[23]), + timezone: reader.readStringOrNull(offsets[24]), + uvIndex: reader.readDoubleList(offsets[25]), + uvIndexMax: reader.readDoubleList(offsets[26]), + visibility: reader.readDoubleList(offsets[27]), + weathercode: reader.readLongList(offsets[28]), + weathercodeDaily: reader.readLongList(offsets[29]), + winddirection10M: reader.readLongList(offsets[30]), + winddirection10MDominant: reader.readLongList(offsets[31]), + windgusts10M: reader.readDoubleList(offsets[32]), + windgusts10MMax: reader.readDoubleList(offsets[33]), + windspeed10M: reader.readDoubleList(offsets[34]), + windspeed10MMax: reader.readDoubleList(offsets[35]), ); object.id = id; return object; @@ -8713,13 +9348,13 @@ P _weatherCardDeserializeProp

( case 12: return (reader.readDoubleList(offset)) as P; case 13: - return (reader.readLongList(offset)) as P; + return (reader.readDoubleList(offset)) as P; case 14: - return (reader.readStringList(offset)) as P; + return (reader.readLongList(offset)) as P; case 15: return (reader.readStringList(offset)) as P; case 16: - return (reader.readDoubleList(offset)) as P; + return (reader.readStringList(offset)) as P; case 17: return (reader.readDoubleList(offset)) as P; case 18: @@ -8727,31 +9362,37 @@ P _weatherCardDeserializeProp

( case 19: return (reader.readDoubleList(offset)) as P; case 20: - return (reader.readStringList(offset)) as P; - case 21: - return (reader.readDateTimeList(offset)) as P; - case 22: - return (reader.readDateTimeOrNull(offset)) as P; - case 23: - return (reader.readStringOrNull(offset)) as P; - case 24: return (reader.readDoubleList(offset)) as P; + case 21: + return (reader.readStringList(offset)) as P; + case 22: + return (reader.readDateTimeList(offset)) as P; + case 23: + return (reader.readDateTimeOrNull(offset)) as P; + case 24: + return (reader.readStringOrNull(offset)) as P; case 25: return (reader.readDoubleList(offset)) as P; case 26: - return (reader.readLongList(offset)) as P; + return (reader.readDoubleList(offset)) as P; case 27: - return (reader.readLongList(offset)) as P; + return (reader.readDoubleList(offset)) as P; case 28: return (reader.readLongList(offset)) as P; case 29: - return (reader.readDoubleList(offset)) as P; + return (reader.readLongList(offset)) as P; case 30: - return (reader.readDoubleList(offset)) as P; + return (reader.readLongList(offset)) as P; case 31: - return (reader.readDoubleList(offset)) as P; + return (reader.readLongList(offset)) as P; case 32: return (reader.readDoubleList(offset)) as P; + case 33: + return (reader.readDoubleList(offset)) as P; + case 34: + return (reader.readDoubleList(offset)) as P; + case 35: + return (reader.readDoubleList(offset)) as P; default: throw IsarError('Unknown property with id $propertyId'); } @@ -10895,6 +11536,179 @@ extension WeatherCardQueryFilter }); } + QueryBuilder + rainSumIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNull( + property: r'rainSum', + )); + }); + } + + QueryBuilder + rainSumIsNotNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNotNull( + property: r'rainSum', + )); + }); + } + + QueryBuilder + rainSumElementEqualTo( + double value, { + double epsilon = Query.epsilon, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'rainSum', + value: value, + epsilon: epsilon, + )); + }); + } + + QueryBuilder + rainSumElementGreaterThan( + double value, { + bool include = false, + double epsilon = Query.epsilon, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + include: include, + property: r'rainSum', + value: value, + epsilon: epsilon, + )); + }); + } + + QueryBuilder + rainSumElementLessThan( + double value, { + bool include = false, + double epsilon = Query.epsilon, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.lessThan( + include: include, + property: r'rainSum', + value: value, + epsilon: epsilon, + )); + }); + } + + QueryBuilder + rainSumElementBetween( + double lower, + double upper, { + bool includeLower = true, + bool includeUpper = true, + double epsilon = Query.epsilon, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.between( + property: r'rainSum', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + epsilon: epsilon, + )); + }); + } + + QueryBuilder + rainSumLengthEqualTo(int length) { + return QueryBuilder.apply(this, (query) { + return query.listLength( + r'rainSum', + length, + true, + length, + true, + ); + }); + } + + QueryBuilder + rainSumIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.listLength( + r'rainSum', + 0, + true, + 0, + true, + ); + }); + } + + QueryBuilder + rainSumIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.listLength( + r'rainSum', + 0, + false, + 999999, + true, + ); + }); + } + + QueryBuilder + rainSumLengthLessThan( + int length, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.listLength( + r'rainSum', + 0, + true, + length, + include, + ); + }); + } + + QueryBuilder + rainSumLengthGreaterThan( + int length, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.listLength( + r'rainSum', + length, + include, + 999999, + true, + ); + }); + } + + QueryBuilder + rainSumLengthBetween( + int lower, + int upper, { + bool includeLower = true, + bool includeUpper = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.listLength( + r'rainSum', + lower, + includeLower, + upper, + includeUpper, + ); + }); + } + QueryBuilder relativehumidity2MIsNull() { return QueryBuilder.apply(this, (query) { @@ -13039,6 +13853,179 @@ extension WeatherCardQueryFilter }); } + QueryBuilder + uvIndexMaxIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNull( + property: r'uvIndexMax', + )); + }); + } + + QueryBuilder + uvIndexMaxIsNotNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNotNull( + property: r'uvIndexMax', + )); + }); + } + + QueryBuilder + uvIndexMaxElementEqualTo( + double value, { + double epsilon = Query.epsilon, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'uvIndexMax', + value: value, + epsilon: epsilon, + )); + }); + } + + QueryBuilder + uvIndexMaxElementGreaterThan( + double value, { + bool include = false, + double epsilon = Query.epsilon, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + include: include, + property: r'uvIndexMax', + value: value, + epsilon: epsilon, + )); + }); + } + + QueryBuilder + uvIndexMaxElementLessThan( + double value, { + bool include = false, + double epsilon = Query.epsilon, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.lessThan( + include: include, + property: r'uvIndexMax', + value: value, + epsilon: epsilon, + )); + }); + } + + QueryBuilder + uvIndexMaxElementBetween( + double lower, + double upper, { + bool includeLower = true, + bool includeUpper = true, + double epsilon = Query.epsilon, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.between( + property: r'uvIndexMax', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + epsilon: epsilon, + )); + }); + } + + QueryBuilder + uvIndexMaxLengthEqualTo(int length) { + return QueryBuilder.apply(this, (query) { + return query.listLength( + r'uvIndexMax', + length, + true, + length, + true, + ); + }); + } + + QueryBuilder + uvIndexMaxIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.listLength( + r'uvIndexMax', + 0, + true, + 0, + true, + ); + }); + } + + QueryBuilder + uvIndexMaxIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.listLength( + r'uvIndexMax', + 0, + false, + 999999, + true, + ); + }); + } + + QueryBuilder + uvIndexMaxLengthLessThan( + int length, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.listLength( + r'uvIndexMax', + 0, + true, + length, + include, + ); + }); + } + + QueryBuilder + uvIndexMaxLengthGreaterThan( + int length, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.listLength( + r'uvIndexMax', + length, + include, + 999999, + true, + ); + }); + } + + QueryBuilder + uvIndexMaxLengthBetween( + int lower, + int upper, { + bool includeLower = true, + bool includeUpper = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.listLength( + r'uvIndexMax', + lower, + includeLower, + upper, + includeUpper, + ); + }); + } + QueryBuilder visibilityIsNull() { return QueryBuilder.apply(this, (query) { @@ -13701,6 +14688,169 @@ extension WeatherCardQueryFilter }); } + QueryBuilder + winddirection10MDominantIsNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNull( + property: r'winddirection10MDominant', + )); + }); + } + + QueryBuilder + winddirection10MDominantIsNotNull() { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(const FilterCondition.isNotNull( + property: r'winddirection10MDominant', + )); + }); + } + + QueryBuilder + winddirection10MDominantElementEqualTo(int value) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.equalTo( + property: r'winddirection10MDominant', + value: value, + )); + }); + } + + QueryBuilder + winddirection10MDominantElementGreaterThan( + int value, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.greaterThan( + include: include, + property: r'winddirection10MDominant', + value: value, + )); + }); + } + + QueryBuilder + winddirection10MDominantElementLessThan( + int value, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.lessThan( + include: include, + property: r'winddirection10MDominant', + value: value, + )); + }); + } + + QueryBuilder + winddirection10MDominantElementBetween( + int lower, + int upper, { + bool includeLower = true, + bool includeUpper = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.addFilterCondition(FilterCondition.between( + property: r'winddirection10MDominant', + lower: lower, + includeLower: includeLower, + upper: upper, + includeUpper: includeUpper, + )); + }); + } + + QueryBuilder + winddirection10MDominantLengthEqualTo(int length) { + return QueryBuilder.apply(this, (query) { + return query.listLength( + r'winddirection10MDominant', + length, + true, + length, + true, + ); + }); + } + + QueryBuilder + winddirection10MDominantIsEmpty() { + return QueryBuilder.apply(this, (query) { + return query.listLength( + r'winddirection10MDominant', + 0, + true, + 0, + true, + ); + }); + } + + QueryBuilder + winddirection10MDominantIsNotEmpty() { + return QueryBuilder.apply(this, (query) { + return query.listLength( + r'winddirection10MDominant', + 0, + false, + 999999, + true, + ); + }); + } + + QueryBuilder + winddirection10MDominantLengthLessThan( + int length, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.listLength( + r'winddirection10MDominant', + 0, + true, + length, + include, + ); + }); + } + + QueryBuilder + winddirection10MDominantLengthGreaterThan( + int length, { + bool include = false, + }) { + return QueryBuilder.apply(this, (query) { + return query.listLength( + r'winddirection10MDominant', + length, + include, + 999999, + true, + ); + }); + } + + QueryBuilder + winddirection10MDominantLengthBetween( + int lower, + int upper, { + bool includeLower = true, + bool includeUpper = true, + }) { + return QueryBuilder.apply(this, (query) { + return query.listLength( + r'winddirection10MDominant', + lower, + includeLower, + upper, + includeUpper, + ); + }); + } + QueryBuilder windgusts10MIsNull() { return QueryBuilder.apply(this, (query) { @@ -14650,6 +15800,12 @@ extension WeatherCardQueryWhereDistinct }); } + QueryBuilder distinctByRainSum() { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(r'rainSum'); + }); + } + QueryBuilder distinctByRelativehumidity2M() { return QueryBuilder.apply(this, (query) { @@ -14727,6 +15883,12 @@ extension WeatherCardQueryWhereDistinct }); } + QueryBuilder distinctByUvIndexMax() { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(r'uvIndexMax'); + }); + } + QueryBuilder distinctByVisibility() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'visibility'); @@ -14753,6 +15915,13 @@ extension WeatherCardQueryWhereDistinct }); } + QueryBuilder + distinctByWinddirection10MDominant() { + return QueryBuilder.apply(this, (query) { + return query.addDistinctBy(r'winddirection10MDominant'); + }); + } + QueryBuilder distinctByWindgusts10M() { return QueryBuilder.apply(this, (query) { return query.addDistinctBy(r'windgusts10M'); @@ -14873,6 +16042,12 @@ extension WeatherCardQueryProperty }); } + QueryBuilder?, QQueryOperations> rainSumProperty() { + return QueryBuilder.apply(this, (query) { + return query.addPropertyName(r'rainSum'); + }); + } + QueryBuilder?, QQueryOperations> relativehumidity2MProperty() { return QueryBuilder.apply(this, (query) { @@ -14951,6 +16126,13 @@ extension WeatherCardQueryProperty }); } + QueryBuilder?, QQueryOperations> + uvIndexMaxProperty() { + return QueryBuilder.apply(this, (query) { + return query.addPropertyName(r'uvIndexMax'); + }); + } + QueryBuilder?, QQueryOperations> visibilityProperty() { return QueryBuilder.apply(this, (query) { @@ -14979,6 +16161,13 @@ extension WeatherCardQueryProperty }); } + QueryBuilder?, QQueryOperations> + winddirection10MDominantProperty() { + return QueryBuilder.apply(this, (query) { + return query.addPropertyName(r'winddirection10MDominant'); + }); + } + QueryBuilder?, QQueryOperations> windgusts10MProperty() { return QueryBuilder.apply(this, (query) { diff --git a/lib/app/modules/card_weather.dart b/lib/app/modules/card_weather.dart index 74784d3..49ad96d 100644 --- a/lib/app/modules/card_weather.dart +++ b/lib/app/modules/card_weather.dart @@ -5,7 +5,6 @@ import 'package:rain/app/controller/controller.dart'; import 'package:rain/app/data/weather.dart'; import 'package:rain/app/modules/weather_card.dart'; import 'package:rain/app/widgets/card.dart'; -import 'package:rain/app/widgets/create_card_weather.dart'; import 'package:rain/app/widgets/shimmer.dart'; class CardWeather extends StatefulWidget { @@ -20,148 +19,133 @@ class _CardWeatherState extends State { @override Widget build(BuildContext context) { - return Scaffold( - body: RefreshIndicator( - onRefresh: () async { - await locationController.updateCacheCard(true); - setState(() {}); - }, - child: StreamBuilder>( - stream: locationController.getWeatherCard(), - builder: (context, listData) { - switch (listData.connectionState) { - case ConnectionState.done: - default: - if (listData.hasData) { - final weatherCard = listData.data!; - if (weatherCard.isEmpty) { - return Center( - child: SingleChildScrollView( - child: Column( - children: [ - Image.asset( - 'assets/images/add_weather.png', - scale: 6, - ), - SizedBox( - width: Get.size.width * 0.8, - child: Text( - 'noWeatherCard'.tr, - textAlign: TextAlign.center, - style: context.theme.textTheme.titleMedium - ?.copyWith( - fontWeight: FontWeight.w600, - fontSize: 18, - ), + return RefreshIndicator( + onRefresh: () async { + await locationController.updateCacheCard(true); + setState(() {}); + }, + child: StreamBuilder>( + stream: locationController.getWeatherCard(), + builder: (context, listData) { + switch (listData.connectionState) { + case ConnectionState.done: + default: + if (listData.hasData) { + final weatherCard = listData.data!; + if (weatherCard.isEmpty) { + return Center( + child: SingleChildScrollView( + child: Column( + children: [ + Image.asset( + 'assets/images/add_weather.png', + scale: 6, + ), + SizedBox( + width: Get.size.width * 0.8, + child: Text( + 'noWeatherCard'.tr, + textAlign: TextAlign.center, + style: + context.theme.textTheme.titleMedium?.copyWith( + fontWeight: FontWeight.w600, + fontSize: 18, ), ), - ], - ), + ), + ], ), - ); - } - return ListView.builder( - itemCount: weatherCard.length, - itemBuilder: (context, index) { - final weatherCardList = weatherCard[index]; - return Dismissible( - key: ValueKey(weatherCardList), - direction: DismissDirection.endToStart, - background: Container( - alignment: Alignment.centerRight, - child: const Padding( - padding: EdgeInsets.only( - right: 15, - ), - child: Icon( - Iconsax.trash, - color: Colors.red, - ), - ), - ), - confirmDismiss: (DismissDirection direction) async { - return await showDialog( - context: context, - builder: (BuildContext context) { - return AlertDialog( - backgroundColor: - context.theme.colorScheme.primaryContainer, - title: Text( - "deletedCardWeather".tr, - style: context.theme.textTheme.titleLarge, - ), - content: Text("deletedCardWeatherQuery".tr, - style: context.theme.textTheme.titleMedium), - actions: [ - TextButton( - onPressed: () => Get.back(result: false), - child: Text("cancel".tr, - style: context - .theme.textTheme.titleMedium - ?.copyWith( - color: Colors.blueAccent))), - TextButton( - onPressed: () => Get.back(result: true), - child: Text("delete".tr, - style: context - .theme.textTheme.titleMedium - ?.copyWith(color: Colors.red))), - ], - ); - }, - ); - }, - onDismissed: (DismissDirection direction) async { - await locationController - .deleteCardWeather(weatherCardList); - }, - child: GestureDetector( - onTap: () => Get.to( - () => WeatherCardPage( - weatherCard: weatherCardList, - ), - transition: Transition.downToUp), - child: CardDescWeather( - time: weatherCardList.time!, - timeDaily: weatherCardList.timeDaily!, - timeDay: weatherCardList.sunrise!, - timeNight: weatherCardList.sunset!, - weather: weatherCardList.weathercode!, - degree: weatherCardList.temperature2M!, - district: weatherCardList.district!, - city: weatherCardList.city!, - timezone: weatherCardList.timezone!, - ), - ), - ); - }, - ); - } else { - return ListView.builder( - itemCount: 10, - itemBuilder: (context, index) => const MyShimmer( - hight: 110, - edgeInsetsMargin: - EdgeInsets.symmetric(vertical: 8, horizontal: 10), ), ); } - } - }, - ), - ), - floatingActionButton: FloatingActionButton( - onPressed: () => showModalBottomSheet( - enableDrag: false, - backgroundColor: context.theme.colorScheme.secondaryContainer, - context: context, - isScrollControlled: true, - builder: (BuildContext context) { - return const CreateWeatherCard(); - }, - ), - backgroundColor: context.theme.colorScheme.tertiaryContainer, - child: const Icon(Iconsax.add), + return ListView.builder( + itemCount: weatherCard.length, + itemBuilder: (context, index) { + final weatherCardList = weatherCard[index]; + return Dismissible( + key: ValueKey(weatherCardList), + direction: DismissDirection.endToStart, + background: Container( + alignment: Alignment.centerRight, + child: const Padding( + padding: EdgeInsets.only( + right: 15, + ), + child: Icon( + Iconsax.trash, + color: Colors.red, + ), + ), + ), + confirmDismiss: (DismissDirection direction) async { + return await showDialog( + context: context, + builder: (BuildContext context) { + return AlertDialog( + backgroundColor: + context.theme.colorScheme.primaryContainer, + title: Text( + "deletedCardWeather".tr, + style: context.theme.textTheme.titleLarge, + ), + content: Text("deletedCardWeatherQuery".tr, + style: context.theme.textTheme.titleMedium), + actions: [ + TextButton( + onPressed: () => Get.back(result: false), + child: Text("cancel".tr, + style: context + .theme.textTheme.titleMedium + ?.copyWith( + color: Colors.blueAccent))), + TextButton( + onPressed: () => Get.back(result: true), + child: Text("delete".tr, + style: context + .theme.textTheme.titleMedium + ?.copyWith(color: Colors.red))), + ], + ); + }, + ); + }, + onDismissed: (DismissDirection direction) async { + await locationController + .deleteCardWeather(weatherCardList); + }, + child: GestureDetector( + onTap: () => Get.to( + () => WeatherCardPage( + weatherCard: weatherCardList, + ), + transition: Transition.downToUp), + child: CardDescWeather( + time: weatherCardList.time!, + timeDaily: weatherCardList.timeDaily!, + timeDay: weatherCardList.sunrise!, + timeNight: weatherCardList.sunset!, + weather: weatherCardList.weathercode!, + degree: weatherCardList.temperature2M!, + district: weatherCardList.district!, + city: weatherCardList.city!, + timezone: weatherCardList.timezone!, + ), + ), + ); + }, + ); + } else { + return ListView.builder( + itemCount: 10, + itemBuilder: (context, index) => const MyShimmer( + hight: 110, + edgeInsetsMargin: + EdgeInsets.symmetric(vertical: 8, horizontal: 10), + ), + ); + } + } + }, ), ); } diff --git a/lib/app/modules/home.dart b/lib/app/modules/home.dart index 373d6fe..fb958d5 100644 --- a/lib/app/modules/home.dart +++ b/lib/app/modules/home.dart @@ -9,6 +9,7 @@ import 'package:rain/app/controller/controller.dart'; import 'package:rain/app/modules/card_weather.dart'; import 'package:rain/app/modules/settings.dart'; import 'package:rain/app/modules/weather.dart'; +import 'package:rain/app/widgets/create_card_weather.dart'; import 'package:rain/main.dart'; class HomePage extends StatefulWidget { @@ -54,11 +55,11 @@ class _HomePageState extends State { ); return Scaffold( - backgroundColor: context.theme.scaffoldBackgroundColor, + backgroundColor: context.theme.colorScheme.surface, appBar: AppBar( centerTitle: true, automaticallyImplyLeading: false, - backgroundColor: context.theme.scaffoldBackgroundColor, + backgroundColor: context.theme.colorScheme.surface, surfaceTintColor: Colors.transparent, elevation: 0, leading: Image.asset( @@ -212,6 +213,21 @@ class _HomePageState extends State { ], ), ), + floatingActionButton: tabIndex == 1 + ? FloatingActionButton( + onPressed: () => showModalBottomSheet( + enableDrag: false, + backgroundColor: context.theme.colorScheme.secondaryContainer, + context: context, + isScrollControlled: true, + builder: (BuildContext context) { + return const CreateWeatherCard(); + }, + ), + backgroundColor: context.theme.colorScheme.tertiaryContainer, + child: const Icon(Iconsax.add), + ) + : null, ); } } diff --git a/lib/app/modules/onboarding.dart b/lib/app/modules/onboarding.dart index d284ce4..e0e48c4 100644 --- a/lib/app/modules/onboarding.dart +++ b/lib/app/modules/onboarding.dart @@ -16,6 +16,7 @@ class _OnboardingPageState extends State { @override Widget build(BuildContext context) { return Scaffold( + backgroundColor: context.theme.colorScheme.surface, body: SafeArea( child: Column( children: [ diff --git a/lib/app/modules/weather.dart b/lib/app/modules/weather.dart index 799f5c8..1865070 100644 --- a/lib/app/modules/weather.dart +++ b/lib/app/modules/weather.dart @@ -176,13 +176,7 @@ class _WeatherPageState extends State { Obx( () => locationController.isLoading.isFalse ? WeatherDaily( - date: locationController.mainWeather.timeDaily!, - weather: - locationController.mainWeather.weathercodeDaily!, - minDegree: - locationController.mainWeather.temperature2MMin!, - maxDegree: - locationController.mainWeather.temperature2MMax!, + mainWeatherCache: locationController.mainWeather, onTap: () => Get.to( () => WeatherMore( mainWeatherCache: locationController.mainWeather, diff --git a/lib/app/modules/weather_card.dart b/lib/app/modules/weather_card.dart index 3ca3e57..c74dee7 100644 --- a/lib/app/modules/weather_card.dart +++ b/lib/app/modules/weather_card.dart @@ -57,10 +57,11 @@ class _WeatherCardPageState extends State { setState(() {}); }, child: Scaffold( + backgroundColor: context.theme.colorScheme.surface, appBar: AppBar( centerTitle: true, automaticallyImplyLeading: false, - backgroundColor: context.theme.scaffoldBackgroundColor, + backgroundColor: context.theme.colorScheme.surface, surfaceTintColor: Colors.transparent, elevation: 0, leading: IconButton( @@ -172,10 +173,7 @@ class _WeatherCardPageState extends State { uvIndex: widget.weatherCard.uvIndex![timeNow], ), WeatherDaily( - date: widget.weatherCard.timeDaily!, - weather: widget.weatherCard.weathercodeDaily!, - minDegree: widget.weatherCard.temperature2MMin!, - maxDegree: widget.weatherCard.temperature2MMax!, + weatherCard: widget.weatherCard, onTap: () => Get.to( () => WeatherMore( weatherCard: widget.weatherCard, diff --git a/lib/app/widgets/card.dart b/lib/app/widgets/card.dart index 6380389..b4048ef 100644 --- a/lib/app/widgets/card.dart +++ b/lib/app/widgets/card.dart @@ -93,16 +93,17 @@ class _CardDescWeatherState extends State { ), const SizedBox(height: 5), StreamBuilder( - stream: Stream.periodic(const Duration(seconds: 1)), - builder: (context, snapshot) { - return Text( - '${'time'.tr}: ${statusImFa.getTimeFormatTz(tz.TZDateTime.now(tz.getLocation(widget.timezone)))}', - style: context.theme.textTheme.titleMedium?.copyWith( - color: Colors.grey, - fontWeight: FontWeight.w400, - ), - ); - }), + stream: Stream.periodic(const Duration(seconds: 1)), + builder: (context, snapshot) { + return Text( + '${'time'.tr}: ${statusImFa.getTimeFormatTz(tz.TZDateTime.now(tz.getLocation(widget.timezone)))}', + style: context.theme.textTheme.titleMedium?.copyWith( + color: Colors.grey, + fontWeight: FontWeight.w400, + ), + ); + }, + ), ], ), ), diff --git a/lib/app/widgets/daily_card.dart b/lib/app/widgets/daily_card.dart index 11f54ab..b6a9032 100644 --- a/lib/app/widgets/daily_card.dart +++ b/lib/app/widgets/daily_card.dart @@ -1,13 +1,15 @@ import 'package:flutter/material.dart'; import 'package:flutter_glow/flutter_glow.dart'; import 'package:get/get.dart'; +import 'package:iconsax/iconsax.dart'; import 'package:intl/intl.dart'; import 'package:rain/app/widgets/desc.dart'; +import 'package:rain/app/widgets/message.dart'; import 'package:rain/app/widgets/status.dart'; import 'package:rain/app/widgets/status_im_fa.dart'; import 'package:rain/app/widgets/sunset_sunrise.dart'; -class DailyCard extends StatelessWidget { +class DailyCard extends StatefulWidget { const DailyCard({ super.key, this.timeDaily, @@ -22,128 +24,230 @@ class DailyCard extends StatelessWidget { this.precipitationProbabilityMax, this.windspeed10MMax, this.windgusts10MMax, + this.uvIndexMax, + this.rainSum, + this.winddirection10MDominant, + required this.index, }); - final DateTime? timeDaily; - final int? weathercodeDaily; - final double? temperature2MMax; - final double? temperature2MMin; - final double? apparentTemperatureMax; - final double? apparentTemperatureMin; - final String? sunrise; - final String? sunset; - final double? precipitationSum; - final int? precipitationProbabilityMax; - final double? windspeed10MMax; - final double? windgusts10MMax; + final List? timeDaily; + final List? weathercodeDaily; + final List? temperature2MMax; + final List? temperature2MMin; + final List? apparentTemperatureMax; + final List? apparentTemperatureMin; + final List? sunrise; + final List? sunset; + final List? precipitationSum; + final List? precipitationProbabilityMax; + final List? windspeed10MMax; + final List? windgusts10MMax; + final List? uvIndexMax; + final List? rainSum; + final List? winddirection10MDominant; + final int index; + + @override + State createState() => _DailyCardState(); +} + +class _DailyCardState extends State { + final locale = Get.locale; + final status = Status(); + final statusImFa = StatusImFa(); + final message = Message(); + late PageController pageController; + int pageIndex = 0; + + @override + void initState() { + pageController = PageController(initialPage: widget.index); + super.initState(); + } + + @override + void dispose() { + pageController.dispose(); + super.dispose(); + } @override Widget build(BuildContext context) { - final locale = Get.locale; - final status = Status(); - final statusImFa = StatusImFa(); - - return Container( - margin: const EdgeInsets.symmetric(horizontal: 10), - child: Column( - children: [ - Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - const SizedBox(height: 15), - Image( - image: AssetImage( - status.getImageNowDaily(weathercodeDaily!, timeDaily!)), - fit: BoxFit.fill, - height: 200, - ), - const SizedBox(height: 10), - GlowText( - '${statusImFa.getDegree(temperature2MMin!.round())} / ${statusImFa.getDegree(temperature2MMax!.round())}', - style: context.theme.textTheme.titleLarge?.copyWith( - fontSize: 30, - fontWeight: FontWeight.w800, - ), - ), - const SizedBox(height: 5), - Text( - status.getText(weathercodeDaily!), - style: context.theme.textTheme.titleLarge, - ), - const SizedBox(height: 5), - Text( - DateFormat.MMMMEEEEd(locale?.languageCode).format(timeDaily!), - style: context.theme.textTheme.labelLarge?.copyWith( - color: Colors.grey, - fontSize: 16, - ), - ), - ], + return Scaffold( + backgroundColor: context.theme.colorScheme.surface, + appBar: AppBar( + automaticallyImplyLeading: false, + backgroundColor: context.theme.colorScheme.surface, + surfaceTintColor: Colors.transparent, + elevation: 0, + centerTitle: true, + leading: IconButton( + onPressed: () { + Get.back(); + }, + icon: const Icon( + Iconsax.arrow_left_1, + size: 20, ), - Padding( - padding: const EdgeInsets.only(top: 15), - child: SunsetSunrise( - timeSunrise: sunrise!, - timeSunset: sunset!, - ), - ), - Container( - margin: const EdgeInsets.only(bottom: 15), - padding: const EdgeInsets.only(top: 20, bottom: 5), - decoration: BoxDecoration( - color: context.theme.colorScheme.primaryContainer, - borderRadius: const BorderRadius.all( - Radius.circular(20), + splashColor: Colors.transparent, + highlightColor: Colors.transparent, + ), + title: Text( + DateFormat.MMMMEEEEd(locale?.languageCode) + .format(widget.timeDaily![pageIndex]), + style: context.theme.textTheme.titleLarge, + ), + ), + body: SafeArea( + child: PageView.builder( + controller: pageController, + onPageChanged: (index) { + setState(() { + pageIndex = index; + }); + }, + itemCount: widget.timeDaily?.length, + itemBuilder: (context, index) { + return Container( + margin: const EdgeInsets.symmetric(horizontal: 10), + child: ListView( + children: [ + Column( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + const SizedBox(height: 15), + Image( + image: AssetImage(status.getImageNowDaily( + widget.weathercodeDaily![index], + widget.timeDaily![index])), + fit: BoxFit.fill, + height: 200, + ), + const SizedBox(height: 10), + GlowText( + '${statusImFa.getDegree(widget.temperature2MMin![index].round())} / ${statusImFa.getDegree(widget.temperature2MMax![index].round())}', + style: context.theme.textTheme.titleLarge?.copyWith( + fontSize: 30, + fontWeight: FontWeight.w800, + ), + ), + const SizedBox(height: 5), + Text( + status.getText(widget.weathercodeDaily![index]), + style: context.theme.textTheme.titleLarge, + ), + const SizedBox(height: 5), + Text( + DateFormat.MMMMEEEEd(locale?.languageCode) + .format(widget.timeDaily![index]), + style: context.theme.textTheme.labelLarge?.copyWith( + color: Colors.grey, + fontSize: 16, + ), + ), + ], + ), + Padding( + padding: const EdgeInsets.only(top: 15), + child: SunsetSunrise( + timeSunrise: widget.sunrise![index], + timeSunset: widget.sunset![index], + ), + ), + Container( + margin: const EdgeInsets.only(bottom: 15), + padding: const EdgeInsets.only(top: 20, bottom: 5), + decoration: BoxDecoration( + color: context.theme.colorScheme.primaryContainer, + borderRadius: const BorderRadius.all( + Radius.circular(20), + ), + ), + child: Column( + children: [ + Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + DescWeather( + imageName: 'assets/images/cold.png', + value: statusImFa.getDegree(widget + .apparentTemperatureMin![index] + .round()), + desc: 'apparentTemperatureMin'.tr, + ), + DescWeather( + imageName: 'assets/images/hot.png', + value: statusImFa.getDegree(widget + .apparentTemperatureMax![index] + .round()), + desc: 'apparentTemperatureMax'.tr, + ), + DescWeather( + imageName: 'assets/images/uv.png', + value: '${widget.uvIndexMax![index].round()}', + desc: 'uvIndex'.tr, + message: message.getUvIndex( + widget.uvIndexMax![index].round()), + ), + ], + ), + const SizedBox(height: 5), + Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + DescWeather( + imageName: 'assets/images/windsock.png', + value: + '${widget.winddirection10MDominant![index]}°', + desc: 'direction'.tr, + message: message.getDirection( + widget.winddirection10MDominant![index]), + ), + DescWeather( + imageName: 'assets/images/wind.png', + value: statusImFa.getSpeed( + widget.windspeed10MMax![index].round()), + desc: 'wind'.tr, + ), + DescWeather( + imageName: 'assets/images/windgusts.png', + value: statusImFa.getSpeed( + widget.windgusts10MMax![index].round()), + desc: 'windgusts'.tr, + ), + ], + ), + const SizedBox(height: 5), + Row( + mainAxisAlignment: MainAxisAlignment.spaceEvenly, + children: [ + DescWeather( + imageName: 'assets/images/humidity.png', + value: + '${widget.precipitationProbabilityMax![index]}%', + desc: 'precipitationProbabilit'.tr, + ), + DescWeather( + imageName: 'assets/images/water.png', + value: statusImFa + .getPrecipitation(widget.rainSum![index]), + desc: 'rain'.tr, + ), + DescWeather( + imageName: 'assets/images/rainfall.png', + value: statusImFa.getPrecipitation( + widget.precipitationSum![index]), + desc: 'precipitation'.tr, + ), + ], + ), + ], + ), + ), + ], ), - ), - child: Column( - children: [ - Row( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - children: [ - DescWeather( - imageName: 'assets/images/humidity.png', - value: '$precipitationProbabilityMax%', - desc: 'precipitationProbabilit'.tr, - ), - DescWeather( - imageName: 'assets/images/wind.png', - value: statusImFa.getSpeed(windspeed10MMax!.round()), - desc: 'wind'.tr, - ), - DescWeather( - imageName: 'assets/images/windgusts.png', - value: statusImFa.getSpeed(windgusts10MMax!.round()), - desc: 'windgusts'.tr, - ), - ], - ), - const SizedBox(height: 5), - Row( - mainAxisAlignment: MainAxisAlignment.spaceEvenly, - children: [ - DescWeather( - imageName: 'assets/images/rainfall.png', - value: statusImFa.getPrecipitation(precipitationSum!), - desc: 'precipitation'.tr, - ), - DescWeather( - imageName: 'assets/images/cold.png', - value: - statusImFa.getDegree(apparentTemperatureMin!.round()), - desc: 'apparentTemperatureMin'.tr, - ), - DescWeather( - imageName: 'assets/images/hot.png', - value: - statusImFa.getDegree(apparentTemperatureMax!.round()), - desc: 'apparentTemperatureMax'.tr, - ), - ], - ), - ], - ), - ), - ], + ); + }, + ), ), ); } diff --git a/lib/app/widgets/list_daily_card.dart b/lib/app/widgets/list_daily_card.dart new file mode 100644 index 0000000..6878346 --- /dev/null +++ b/lib/app/widgets/list_daily_card.dart @@ -0,0 +1,75 @@ +import 'package:flutter/material.dart'; +import 'package:get/get.dart'; +import 'package:intl/intl.dart'; +import 'package:rain/app/widgets/status.dart'; +import 'package:rain/app/widgets/status_im_fa.dart'; + +class ListCardDaily extends StatelessWidget { + const ListCardDaily({ + super.key, + this.timeDaily, + this.weathercodeDaily, + this.temperature2MMax, + this.temperature2MMin, + }); + final DateTime? timeDaily; + final int? weathercodeDaily; + final double? temperature2MMax; + final double? temperature2MMin; + + @override + Widget build(BuildContext context) { + final locale = Get.locale; + final status = Status(); + final statusImFa = StatusImFa(); + + return Container( + width: double.infinity, + margin: const EdgeInsets.symmetric(horizontal: 10, vertical: 8), + padding: const EdgeInsets.symmetric(vertical: 15, horizontal: 20), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(20), + color: context.theme.colorScheme.primaryContainer, + ), + child: Row( + children: [ + Expanded( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + '${statusImFa.getDegree(temperature2MMin!.round())} / ${statusImFa.getDegree(temperature2MMax!.round())}', + style: context.theme.textTheme.titleLarge?.copyWith( + fontSize: 22, + fontWeight: FontWeight.w600, + ), + ), + const SizedBox(height: 5), + Text( + DateFormat.MMMMEEEEd(locale?.languageCode).format(timeDaily!), + style: context.theme.textTheme.titleMedium?.copyWith( + color: Colors.grey, + fontWeight: FontWeight.w400, + ), + ), + const SizedBox(height: 5), + Text( + status.getText(weathercodeDaily!), + style: context.theme.textTheme.titleMedium?.copyWith( + color: Colors.grey, + fontWeight: FontWeight.w400, + ), + ), + ], + ), + ), + const SizedBox(width: 5), + Image.asset( + status.getImageNowDaily(weathercodeDaily!, timeDaily!), + scale: 6.5, + ), + ], + ), + ); + } +} diff --git a/lib/app/widgets/weather_daily.dart b/lib/app/widgets/weather_daily.dart index 7d5ea93..78f7470 100644 --- a/lib/app/widgets/weather_daily.dart +++ b/lib/app/widgets/weather_daily.dart @@ -1,22 +1,20 @@ import 'package:flutter/material.dart'; import 'package:get/get.dart'; import 'package:intl/intl.dart'; +import 'package:rain/app/data/weather.dart'; +import 'package:rain/app/widgets/daily_card.dart'; import 'package:rain/app/widgets/status.dart'; import 'package:rain/app/widgets/status_im_fa.dart'; class WeatherDaily extends StatefulWidget { const WeatherDaily({ super.key, - required this.date, - required this.weather, - required this.minDegree, - required this.maxDegree, + this.mainWeatherCache, + this.weatherCard, required this.onTap, }); - final List date; - final List weather; - final List minDegree; - final List maxDegree; + final MainWeatherCache? mainWeatherCache; + final WeatherCard? weatherCard; final Function() onTap; @override @@ -50,70 +48,130 @@ class _WeatherDailyState extends State { physics: const NeverScrollableScrollPhysics(), itemCount: 7, itemBuilder: (ctx, i) { - return Container( - margin: const EdgeInsets.symmetric(vertical: 12), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - Expanded( - child: Text( - DateFormat.EEEE(locale?.languageCode) - .format(widget.date[i]), - style: context.theme.textTheme.labelLarge, + return InkWell( + onTap: () => Get.to( + () => DailyCard( + timeDaily: widget.mainWeatherCache?.timeDaily ?? + widget.weatherCard?.timeDaily, + weathercodeDaily: + widget.mainWeatherCache?.weathercodeDaily ?? + widget.weatherCard?.weathercodeDaily, + temperature2MMax: + widget.mainWeatherCache?.temperature2MMax ?? + widget.weatherCard?.temperature2MMax, + temperature2MMin: + widget.mainWeatherCache?.temperature2MMin ?? + widget.weatherCard?.temperature2MMin, + apparentTemperatureMax: widget + .mainWeatherCache?.apparentTemperatureMax ?? + widget.weatherCard?.apparentTemperatureMax, + apparentTemperatureMin: widget + .mainWeatherCache?.apparentTemperatureMin ?? + widget.weatherCard?.apparentTemperatureMin, + sunrise: widget.mainWeatherCache?.sunrise ?? + widget.weatherCard?.sunrise, + sunset: widget.mainWeatherCache?.sunset ?? + widget.weatherCard?.sunset, + precipitationSum: + widget.mainWeatherCache?.precipitationSum ?? + widget.weatherCard?.precipitationSum, + precipitationProbabilityMax: widget.mainWeatherCache + ?.precipitationProbabilityMax ?? + widget.weatherCard?.precipitationProbabilityMax, + windspeed10MMax: + widget.mainWeatherCache?.windspeed10MMax ?? + widget.weatherCard?.windspeed10MMax, + windgusts10MMax: + widget.mainWeatherCache?.windgusts10MMax ?? + widget.weatherCard?.windgusts10MMax, + uvIndexMax: widget.mainWeatherCache?.uvIndexMax ?? + widget.weatherCard?.uvIndexMax, + rainSum: widget.mainWeatherCache?.rainSum! ?? + widget.weatherCard?.rainSum, + winddirection10MDominant: widget.mainWeatherCache + ?.winddirection10MDominant ?? + widget.weatherCard?.winddirection10MDominant, + index: i, + ), + transition: Transition.downToUp), + child: Container( + margin: const EdgeInsets.symmetric(vertical: 12), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Expanded( + child: Text( + DateFormat.EEEE(locale?.languageCode).format( + widget.mainWeatherCache?.timeDaily![i] ?? + widget.weatherCard!.timeDaily![i]), + style: context.theme.textTheme.labelLarge, + ), ), - ), - Expanded( - child: Row( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - Image.asset( - status.getImage7Day(widget.weather[i]), - scale: 3, - ), - const SizedBox(width: 5), - Expanded( - child: Text( - status.getText(widget.weather[i]), + Expanded( + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + children: [ + Image.asset( + status.getImage7Day(widget.mainWeatherCache + ?.weathercodeDaily![i] ?? + widget.weatherCard!.weathercodeDaily![i]), + scale: 3, + ), + const SizedBox(width: 5), + Expanded( + child: Text( + status.getText(widget.mainWeatherCache + ?.weathercodeDaily![i] ?? + widget.weatherCard!.weathercodeDaily![i]), + style: context.theme.textTheme.labelLarge, + overflow: TextOverflow.ellipsis, + ), + ), + ], + ), + ), + Expanded( + child: Row( + mainAxisAlignment: MainAxisAlignment.end, + children: [ + Text( + statusImFa.getDegree(widget + .mainWeatherCache?.temperature2MMin![i] + .round() ?? + widget.weatherCard!.temperature2MMin![i] + .round()), style: context.theme.textTheme.labelLarge, - overflow: TextOverflow.ellipsis, ), - ), - ], + Text( + ' / ', + style: context.theme.textTheme.bodyMedium + ?.copyWith( + color: Colors.grey, + ), + ), + Text( + statusImFa.getDegree(widget + .mainWeatherCache?.temperature2MMax![i] + .round() ?? + widget.weatherCard!.temperature2MMax![i] + .round()), + style: context.theme.textTheme.bodyMedium + ?.copyWith( + color: Colors.grey, + ), + ), + ], + ), ), - ), - Expanded( - child: Row( - mainAxisAlignment: MainAxisAlignment.end, - children: [ - Text( - statusImFa.getDegree(widget.minDegree[i].round()), - style: context.theme.textTheme.labelLarge, - ), - Text( - ' / ', - style: - context.theme.textTheme.bodyMedium?.copyWith( - color: Colors.grey, - ), - ), - Text( - statusImFa.getDegree(widget.maxDegree[i].round()), - style: - context.theme.textTheme.bodyMedium?.copyWith( - color: Colors.grey, - ), - ), - ], - ), - ), - ], + ], + ), ), ); }, ), ), const Divider(), - GestureDetector( + InkWell( onTap: widget.onTap, child: Padding( padding: const EdgeInsets.symmetric(vertical: 10), diff --git a/lib/app/widgets/weather_more.dart b/lib/app/widgets/weather_more.dart index b813943..bf0e357 100644 --- a/lib/app/widgets/weather_more.dart +++ b/lib/app/widgets/weather_more.dart @@ -1,9 +1,9 @@ import 'package:flutter/material.dart'; import 'package:get/get.dart'; import 'package:iconsax/iconsax.dart'; -import 'package:nested_scroll_views/material.dart'; import 'package:rain/app/data/weather.dart'; import 'package:rain/app/widgets/daily_card.dart'; +import 'package:rain/app/widgets/list_daily_card.dart'; class WeatherMore extends StatefulWidget { const WeatherMore({ @@ -19,27 +19,13 @@ class WeatherMore extends StatefulWidget { } class _WeatherMoreState extends State { - late PageController pageController; - int pageIndex = 0; - - @override - void initState() { - pageController = PageController(initialPage: 0); - super.initState(); - } - - @override - void dispose() { - pageController.dispose(); - super.dispose(); - } - @override Widget build(BuildContext context) { return Scaffold( + backgroundColor: context.theme.colorScheme.surface, appBar: AppBar( automaticallyImplyLeading: false, - backgroundColor: context.theme.scaffoldBackgroundColor, + backgroundColor: context.theme.colorScheme.surface, surfaceTintColor: Colors.transparent, elevation: 0, centerTitle: true, @@ -59,98 +45,67 @@ class _WeatherMoreState extends State { style: context.theme.textTheme.titleLarge, ), ), - body: Row( - children: [ - Expanded( - child: NestedPageView.builder( - scrollDirection: Axis.vertical, - controller: pageController, - onPageChanged: (index) { - setState(() { - pageIndex = index; - }); - }, - itemCount: widget.mainWeatherCache?.timeDaily!.length ?? - widget.weatherCard?.timeDaily!.length, - itemBuilder: (context, index) => SingleChildScrollView( - child: DailyCard( - timeDaily: widget.mainWeatherCache?.timeDaily![index] ?? - widget.weatherCard?.timeDaily![index], - weathercodeDaily: - widget.mainWeatherCache?.weathercodeDaily![index] ?? - widget.weatherCard?.weathercodeDaily![index], - temperature2MMax: - widget.mainWeatherCache?.temperature2MMax![index] ?? - widget.weatherCard?.temperature2MMax![index], - temperature2MMin: - widget.mainWeatherCache?.temperature2MMin![index] ?? - widget.weatherCard?.temperature2MMin![index], - apparentTemperatureMax: - widget.mainWeatherCache?.apparentTemperatureMax![index] ?? - widget.weatherCard?.apparentTemperatureMax![index], - apparentTemperatureMin: - widget.mainWeatherCache?.apparentTemperatureMin![index] ?? - widget.weatherCard?.apparentTemperatureMin![index], - sunrise: widget.mainWeatherCache?.sunrise![index] ?? - widget.weatherCard?.sunrise![index], - sunset: widget.mainWeatherCache?.sunset![index] ?? - widget.weatherCard?.sunset![index], - precipitationSum: - widget.mainWeatherCache?.precipitationSum![index] ?? - widget.weatherCard?.precipitationSum![index], - precipitationProbabilityMax: widget.mainWeatherCache - ?.precipitationProbabilityMax![index] ?? - widget.weatherCard?.precipitationProbabilityMax![index], - windspeed10MMax: - widget.mainWeatherCache?.windspeed10MMax![index] ?? - widget.weatherCard?.windspeed10MMax![index], - windgusts10MMax: - widget.mainWeatherCache?.windgusts10MMax![index] ?? - widget.weatherCard?.windgusts10MMax![index], - ), - ), - ), - ), - Column( - mainAxisAlignment: MainAxisAlignment.center, - children: [ - ...List.generate( - widget.mainWeatherCache?.timeDaily!.length ?? - widget.weatherCard!.timeDaily!.length, - (index) => Padding( - padding: const EdgeInsets.symmetric(vertical: 3), - child: DotIndicator( - isActive: index == pageIndex, + body: ListView.builder( + itemCount: widget.mainWeatherCache?.timeDaily!.length ?? + widget.weatherCard?.timeDaily!.length, + itemBuilder: (context, index) => GestureDetector( + onTap: () => Get.to( + () => DailyCard( + timeDaily: widget.mainWeatherCache?.timeDaily ?? + widget.weatherCard?.timeDaily, + weathercodeDaily: + widget.mainWeatherCache?.weathercodeDaily ?? + widget.weatherCard?.weathercodeDaily, + temperature2MMax: + widget.mainWeatherCache?.temperature2MMax ?? + widget.weatherCard?.temperature2MMax, + temperature2MMin: + widget.mainWeatherCache?.temperature2MMin ?? + widget.weatherCard?.temperature2MMin, + apparentTemperatureMax: + widget.mainWeatherCache?.apparentTemperatureMax ?? + widget.weatherCard?.apparentTemperatureMax, + apparentTemperatureMin: + widget.mainWeatherCache?.apparentTemperatureMin ?? + widget.weatherCard?.apparentTemperatureMin, + sunrise: widget.mainWeatherCache?.sunrise ?? + widget.weatherCard?.sunrise, + sunset: widget.mainWeatherCache?.sunset ?? + widget.weatherCard?.sunset, + precipitationSum: + widget.mainWeatherCache?.precipitationSum ?? + widget.weatherCard?.precipitationSum, + precipitationProbabilityMax: + widget.mainWeatherCache?.precipitationProbabilityMax ?? + widget.weatherCard?.precipitationProbabilityMax, + windspeed10MMax: widget.mainWeatherCache?.windspeed10MMax ?? + widget.weatherCard?.windspeed10MMax, + windgusts10MMax: widget.mainWeatherCache?.windgusts10MMax ?? + widget.weatherCard?.windgusts10MMax, + uvIndexMax: widget.mainWeatherCache?.uvIndexMax ?? + widget.weatherCard?.uvIndexMax, + rainSum: widget.mainWeatherCache?.rainSum ?? + widget.weatherCard?.rainSum, + winddirection10MDominant: + widget.mainWeatherCache?.winddirection10MDominant ?? + widget.weatherCard?.winddirection10MDominant, + index: index, ), - ), - ), - ], + transition: Transition.downToUp), + child: ListCardDaily( + timeDaily: widget.mainWeatherCache?.timeDaily![index] ?? + widget.weatherCard?.timeDaily![index], + weathercodeDaily: + widget.mainWeatherCache?.weathercodeDaily![index] ?? + widget.weatherCard?.weathercodeDaily![index], + temperature2MMax: + widget.mainWeatherCache?.temperature2MMax![index] ?? + widget.weatherCard?.temperature2MMax![index], + temperature2MMin: + widget.mainWeatherCache?.temperature2MMin![index] ?? + widget.weatherCard?.temperature2MMin![index], ), - ], - ), - ); - } -} - -class DotIndicator extends StatelessWidget { - const DotIndicator({ - Key? key, - this.isActive = false, - }) : super(key: key); - - final bool isActive; - - @override - Widget build(BuildContext context) { - return AnimatedContainer( - duration: const Duration(milliseconds: 300), - height: 8, - width: 8, - decoration: BoxDecoration( - color: isActive - ? context.theme.dividerColor - : context.theme.colorScheme.primaryContainer, - shape: BoxShape.circle, + ), ), ); } diff --git a/lib/theme/theme.dart b/lib/theme/theme.dart index 80257b7..990e8c6 100644 --- a/lib/theme/theme.dart +++ b/lib/theme/theme.dart @@ -11,6 +11,7 @@ class RainTheme { colorScheme: ColorScheme.fromSeed( seedColor: Colors.blue, brightness: Brightness.light, + surface: Colors.white, primaryContainer: const Color.fromARGB(255, 245, 245, 245), secondaryContainer: const Color.fromARGB(255, 240, 240, 240), tertiaryContainer: const Color.fromARGB(255, 250, 250, 250), @@ -21,7 +22,6 @@ class RainTheme { snackBarTheme: const SnackBarThemeData( backgroundColor: Color.fromARGB(255, 225, 225, 225), ), - scaffoldBackgroundColor: Colors.white, bottomNavigationBarTheme: baseLigth.bottomNavigationBarTheme.copyWith( backgroundColor: const Color.fromARGB(255, 250, 250, 250), ), @@ -37,6 +37,7 @@ class RainTheme { colorScheme: ColorScheme.fromSeed( seedColor: Colors.blue, brightness: Brightness.dark, + surface: Colors.black, primaryContainer: const Color.fromARGB(255, 15, 15, 15), secondaryContainer: const Color.fromARGB(255, 10, 10, 10), tertiaryContainer: const Color.fromARGB(255, 20, 20, 20), @@ -47,7 +48,6 @@ class RainTheme { snackBarTheme: const SnackBarThemeData( backgroundColor: Color.fromARGB(255, 55, 55, 55), ), - scaffoldBackgroundColor: Colors.black, bottomNavigationBarTheme: baseLigth.bottomNavigationBarTheme.copyWith( backgroundColor: const Color.fromARGB(255, 10, 10, 10), ), @@ -63,6 +63,7 @@ class RainTheme { colorScheme: ColorScheme.fromSeed( seedColor: Colors.blue, brightness: Brightness.dark, + surface: const Color.fromARGB(255, 30, 30, 30), primaryContainer: const Color.fromARGB(255, 40, 40, 40), secondaryContainer: const Color.fromARGB(255, 25, 25, 25), tertiaryContainer: const Color.fromARGB(255, 45, 45, 45), @@ -73,7 +74,6 @@ class RainTheme { snackBarTheme: const SnackBarThemeData( backgroundColor: Color.fromARGB(255, 55, 55, 55), ), - scaffoldBackgroundColor: const Color.fromARGB(255, 30, 30, 30), bottomNavigationBarTheme: baseLigth.bottomNavigationBarTheme.copyWith( backgroundColor: const Color.fromARGB(255, 28, 28, 28), ), diff --git a/pubspec.lock b/pubspec.lock index f7ab047..c6ba032 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -189,10 +189,10 @@ packages: dependency: transitive description: name: crypto - sha256: aa274aa7774f8964e4f4f38cc994db7b6158dd36e9187aaceaddc994b35c6c67 + sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab url: "https://pub.dev" source: hosted - version: "3.0.2" + version: "3.0.3" csslib: dependency: transitive description: @@ -213,10 +213,10 @@ packages: dependency: transitive description: name: dart_style - sha256: "6d691edde054969f0e0f26abb1b30834b5138b963793e56f69d3a9a4435e6352" + sha256: f4f1f73ab3fd2afcbcca165ee601fe980d966af6a21b5970c6c9376955c528ad url: "https://pub.dev" source: hosted - version: "2.3.0" + version: "2.3.1" dartx: dependency: transitive description: @@ -416,44 +416,51 @@ packages: geolocator: dependency: "direct main" description: - path: geolocator - ref: master - resolved-ref: "13e6dfee4d32ba9572e8b7e6d263ebd7ffc562db" - url: "https://gitlab.com/free2pass/flutter-geolocator-floss.git" - source: git - version: "7.6.2" + name: geolocator + sha256: "5c23f3613f50586c0bbb2b8f970240ae66b3bd992088cf60dd5ee2e6f7dde3a8" + url: "https://pub.dev" + source: hosted + version: "9.0.2" geolocator_android: dependency: transitive description: name: geolocator_android - sha256: dde5cd786a66f29ee74abe60095b4fe99735faa52926dcac1246747a7533cf6b + sha256: "2ba24690aee0a3e1b6b7bd47c2711a50c874e95e4c758346589d35194adf6d6a" url: "https://pub.dev" source: hosted - version: "1.0.2" + version: "4.1.7" geolocator_apple: dependency: transitive description: name: geolocator_apple - sha256: "1e8e398cc92151d946a4bbd34e2075885333e42d35ca33e418e7ce7b0a29991e" + sha256: "22b60ca3b8c0f58e6a9688ff855ee39ab813ca3f0c0609a48d282f6631266f2e" url: "https://pub.dev" source: hosted - version: "1.2.2" + version: "2.2.5" geolocator_platform_interface: dependency: transitive description: name: geolocator_platform_interface - sha256: "9d6f34a8a4b704d504f34acc5e52d880a7d2caedd99739902d6319179b0336d4" + sha256: af4d69231452f9620718588f41acc4cb58312368716bfff2e92e770b46ce6386 url: "https://pub.dev" source: hosted - version: "2.3.6" + version: "4.0.7" geolocator_web: dependency: transitive description: name: geolocator_web - sha256: "0b9e0ec13ce2211085cae0055b3516c975bd6cfe2878a20c8f13611f1a259855" + sha256: f68a122da48fcfff68bbc9846bb0b74ef651afe84a1b1f6ec20939de4d6860e1 url: "https://pub.dev" source: hosted - version: "2.0.6" + version: "2.1.6" + geolocator_windows: + dependency: transitive + description: + name: geolocator_windows + sha256: f5911c88e23f48b598dd506c7c19eff0e001645bdc03bb6fecb9f4549208354d + url: "https://pub.dev" + source: hosted + version: "0.1.1" get: dependency: "direct main" description: @@ -530,10 +537,10 @@ packages: dependency: transitive description: name: image - sha256: "73964e3609fb96e01e69b0924b939967c556e46c7ff05db2ea9e31019000f4ef" + sha256: a72242c9a0ffb65d03de1b7113bc4e189686fc07c7147b8b41811d0dd0e0d9bf url: "https://pub.dev" source: hosted - version: "4.0.16" + version: "4.0.17" internet_connection_checker: dependency: "direct main" description: @@ -654,14 +661,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.4" - nested_scroll_views: - dependency: "direct main" - description: - name: nested_scroll_views - sha256: "5ebbaf7d86d7cec55433532b0476aa1275cbe3298e1303d02db06b7b5e70b362" - url: "https://pub.dev" - source: hosted - version: "0.0.7" nm: dependency: transitive description: @@ -802,26 +801,26 @@ packages: dependency: transitive description: name: pub_semver - sha256: "307de764d305289ff24ad257ad5c5793ce56d04947599ad68b3baa124105fc17" + sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c" url: "https://pub.dev" source: hosted - version: "2.1.3" + version: "2.1.4" pubspec_parse: dependency: transitive description: name: pubspec_parse - sha256: ec85d7d55339d85f44ec2b682a82fea340071e8978257e5a43e69f79e98ef50c + sha256: c63b2876e58e194e4b0828fcb080ad0e06d051cb607a6be51a9e084f47cb9367 url: "https://pub.dev" source: hosted - version: "1.2.2" + version: "1.2.3" scrollable_positioned_list: dependency: "direct main" description: name: scrollable_positioned_list - sha256: "45806e0d64aa9dcbf4ced336eabff766dd7ba734014fd71c89bc08241c02bfc5" + sha256: "3806b84fa3da65e47146252061d20d12ce254560a6ad098d24b6bad19e079e5d" url: "https://pub.dev" source: hosted - version: "0.3.6" + version: "0.3.7" shelf: dependency: transitive description: @@ -855,10 +854,10 @@ packages: dependency: transitive description: name: source_gen - sha256: c2bea18c95cfa0276a366270afaa2850b09b4a76db95d546f3d003dcc7011298 + sha256: b20e191de6964e98032573cecb1d2b169d96ba63fdb586d24dcd1003ba7e94f6 url: "https://pub.dev" source: hosted - version: "1.2.7" + version: "1.3.0" source_span: dependency: transitive description: @@ -1047,10 +1046,10 @@ packages: dependency: transitive description: name: win32 - sha256: dd8f9344bc305ae2923e3d11a2a911d9a4e2c7dd6fe0ed10626d63211a69676e + sha256: "5a751eddf9db89b3e5f9d50c20ab8612296e4e8db69009788d6c8b060a84191c" url: "https://pub.dev" source: hosted - version: "4.1.3" + version: "4.1.4" xdg_directories: dependency: transitive description: @@ -1079,10 +1078,10 @@ packages: dependency: transitive description: name: yaml - sha256: "23812a9b125b48d4007117254bca50abb6c712352927eece9e155207b1db2370" + sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5" url: "https://pub.dev" source: hosted - version: "3.1.1" + version: "3.1.2" sdks: - dart: ">=2.19.4 <3.0.0" + dart: ">=2.19.6 <3.0.0" flutter: ">=3.4.0-17.0.pre" diff --git a/pubspec.yaml b/pubspec.yaml index 2953d37..0bdf6bf 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -6,7 +6,7 @@ publish_to: "none" version: 1.1.10+21 environment: - sdk: ">=2.19.4 <3.0.0" + sdk: ">=2.19.6 <3.0.0" dependencies: flutter: @@ -21,11 +21,7 @@ dependencies: iconsax: ^0.0.8 timezone: ^0.9.2 geocoding: ^2.1.0 - geolocator: - git: - url: https://gitlab.com/free2pass/flutter-geolocator-floss.git - ref: master - path: geolocator + geolocator: ^9.0.2 flutter_glow: ^0.3.0 url_launcher: ^6.1.10 dynamic_color: ^1.6.3 @@ -36,11 +32,10 @@ dependencies: isar_flutter_libs: ^3.1.0+1 flutter_displaymode: ^0.6.0 lat_lng_to_timezone: ^0.2.0 - nested_scroll_views: ^0.0.7 custom_navigation_bar: ^0.8.2 flutter_native_timezone: ^2.0.0 material_color_utilities: ^0.2.0 - scrollable_positioned_list: ^0.3.6 + scrollable_positioned_list: ^0.3.7 flutter_local_notifications: ^14.0.0+1 internet_connection_checker: ^1.0.0+1 diff --git a/windows/flutter/generated_plugin_registrant.cc b/windows/flutter/generated_plugin_registrant.cc index 2452ab4..f8a9621 100644 --- a/windows/flutter/generated_plugin_registrant.cc +++ b/windows/flutter/generated_plugin_registrant.cc @@ -8,6 +8,7 @@ #include #include +#include #include #include @@ -16,6 +17,8 @@ void RegisterPlugins(flutter::PluginRegistry* registry) { registry->GetRegistrarForPlugin("ConnectivityPlusWindowsPlugin")); DynamicColorPluginCApiRegisterWithRegistrar( registry->GetRegistrarForPlugin("DynamicColorPluginCApi")); + GeolocatorWindowsRegisterWithRegistrar( + registry->GetRegistrarForPlugin("GeolocatorWindows")); IsarFlutterLibsPluginRegisterWithRegistrar( registry->GetRegistrarForPlugin("IsarFlutterLibsPlugin")); UrlLauncherWindowsRegisterWithRegistrar( diff --git a/windows/flutter/generated_plugins.cmake b/windows/flutter/generated_plugins.cmake index 79bae17..ca34188 100644 --- a/windows/flutter/generated_plugins.cmake +++ b/windows/flutter/generated_plugins.cmake @@ -5,6 +5,7 @@ list(APPEND FLUTTER_PLUGIN_LIST connectivity_plus dynamic_color + geolocator_windows isar_flutter_libs url_launcher_windows ) From bb6f7de58692b0f8e44e9f1bc3168544c6b06805 Mon Sep 17 00:00:00 2001 From: Yoshi Date: Sun, 7 May 2023 13:30:26 +0300 Subject: [PATCH 005/234] fix --- lib/app/widgets/daily_card.dart | 108 +++++++++++++-------------- lib/app/widgets/list_daily_card.dart | 24 +++--- lib/app/widgets/weather_daily.dart | 63 ++++++++-------- lib/app/widgets/weather_more.dart | 38 +++++----- 4 files changed, 117 insertions(+), 116 deletions(-) diff --git a/lib/app/widgets/daily_card.dart b/lib/app/widgets/daily_card.dart index b6a9032..76a9052 100644 --- a/lib/app/widgets/daily_card.dart +++ b/lib/app/widgets/daily_card.dart @@ -12,38 +12,38 @@ import 'package:rain/app/widgets/sunset_sunrise.dart'; class DailyCard extends StatefulWidget { const DailyCard({ super.key, - this.timeDaily, - this.weathercodeDaily, - this.temperature2MMax, - this.temperature2MMin, - this.apparentTemperatureMax, - this.apparentTemperatureMin, - this.sunrise, - this.sunset, - this.precipitationSum, - this.precipitationProbabilityMax, - this.windspeed10MMax, - this.windgusts10MMax, - this.uvIndexMax, - this.rainSum, - this.winddirection10MDominant, + required this.timeDaily, + required this.weathercodeDaily, + required this.temperature2MMax, + required this.temperature2MMin, + required this.apparentTemperatureMax, + required this.apparentTemperatureMin, + required this.sunrise, + required this.sunset, + required this.precipitationSum, + required this.precipitationProbabilityMax, + required this.windspeed10MMax, + required this.windgusts10MMax, + required this.uvIndexMax, + required this.rainSum, + required this.winddirection10MDominant, required this.index, }); - final List? timeDaily; - final List? weathercodeDaily; - final List? temperature2MMax; - final List? temperature2MMin; - final List? apparentTemperatureMax; - final List? apparentTemperatureMin; - final List? sunrise; - final List? sunset; - final List? precipitationSum; - final List? precipitationProbabilityMax; - final List? windspeed10MMax; - final List? windgusts10MMax; - final List? uvIndexMax; - final List? rainSum; - final List? winddirection10MDominant; + final List timeDaily; + final List weathercodeDaily; + final List temperature2MMax; + final List temperature2MMin; + final List apparentTemperatureMax; + final List apparentTemperatureMin; + final List sunrise; + final List sunset; + final List precipitationSum; + final List precipitationProbabilityMax; + final List windspeed10MMax; + final List windgusts10MMax; + final List uvIndexMax; + final List rainSum; + final List winddirection10MDominant; final int index; @override @@ -93,7 +93,7 @@ class _DailyCardState extends State { ), title: Text( DateFormat.MMMMEEEEd(locale?.languageCode) - .format(widget.timeDaily![pageIndex]), + .format(widget.timeDaily[pageIndex]), style: context.theme.textTheme.titleLarge, ), ), @@ -105,7 +105,7 @@ class _DailyCardState extends State { pageIndex = index; }); }, - itemCount: widget.timeDaily?.length, + itemCount: widget.timeDaily.length, itemBuilder: (context, index) { return Container( margin: const EdgeInsets.symmetric(horizontal: 10), @@ -117,14 +117,14 @@ class _DailyCardState extends State { const SizedBox(height: 15), Image( image: AssetImage(status.getImageNowDaily( - widget.weathercodeDaily![index], - widget.timeDaily![index])), + widget.weathercodeDaily[index], + widget.timeDaily[index])), fit: BoxFit.fill, height: 200, ), const SizedBox(height: 10), GlowText( - '${statusImFa.getDegree(widget.temperature2MMin![index].round())} / ${statusImFa.getDegree(widget.temperature2MMax![index].round())}', + '${statusImFa.getDegree(widget.temperature2MMin[index].round())} / ${statusImFa.getDegree(widget.temperature2MMax[index].round())}', style: context.theme.textTheme.titleLarge?.copyWith( fontSize: 30, fontWeight: FontWeight.w800, @@ -132,13 +132,13 @@ class _DailyCardState extends State { ), const SizedBox(height: 5), Text( - status.getText(widget.weathercodeDaily![index]), + status.getText(widget.weathercodeDaily[index]), style: context.theme.textTheme.titleLarge, ), const SizedBox(height: 5), Text( DateFormat.MMMMEEEEd(locale?.languageCode) - .format(widget.timeDaily![index]), + .format(widget.timeDaily[index]), style: context.theme.textTheme.labelLarge?.copyWith( color: Colors.grey, fontSize: 16, @@ -149,8 +149,8 @@ class _DailyCardState extends State { Padding( padding: const EdgeInsets.only(top: 15), child: SunsetSunrise( - timeSunrise: widget.sunrise![index], - timeSunset: widget.sunset![index], + timeSunrise: widget.sunrise[index], + timeSunset: widget.sunset[index], ), ), Container( @@ -169,24 +169,22 @@ class _DailyCardState extends State { children: [ DescWeather( imageName: 'assets/images/cold.png', - value: statusImFa.getDegree(widget - .apparentTemperatureMin![index] - .round()), + value: statusImFa.getDegree( + widget.apparentTemperatureMin[index].round()), desc: 'apparentTemperatureMin'.tr, ), DescWeather( imageName: 'assets/images/hot.png', - value: statusImFa.getDegree(widget - .apparentTemperatureMax![index] - .round()), + value: statusImFa.getDegree( + widget.apparentTemperatureMax[index].round()), desc: 'apparentTemperatureMax'.tr, ), DescWeather( imageName: 'assets/images/uv.png', - value: '${widget.uvIndexMax![index].round()}', + value: '${widget.uvIndexMax[index].round()}', desc: 'uvIndex'.tr, - message: message.getUvIndex( - widget.uvIndexMax![index].round()), + message: message + .getUvIndex(widget.uvIndexMax[index].round()), ), ], ), @@ -197,21 +195,21 @@ class _DailyCardState extends State { DescWeather( imageName: 'assets/images/windsock.png', value: - '${widget.winddirection10MDominant![index]}°', + '${widget.winddirection10MDominant[index]}°', desc: 'direction'.tr, message: message.getDirection( - widget.winddirection10MDominant![index]), + widget.winddirection10MDominant[index]), ), DescWeather( imageName: 'assets/images/wind.png', value: statusImFa.getSpeed( - widget.windspeed10MMax![index].round()), + widget.windspeed10MMax[index].round()), desc: 'wind'.tr, ), DescWeather( imageName: 'assets/images/windgusts.png', value: statusImFa.getSpeed( - widget.windgusts10MMax![index].round()), + widget.windgusts10MMax[index].round()), desc: 'windgusts'.tr, ), ], @@ -223,19 +221,19 @@ class _DailyCardState extends State { DescWeather( imageName: 'assets/images/humidity.png', value: - '${widget.precipitationProbabilityMax![index]}%', + '${widget.precipitationProbabilityMax[index]}%', desc: 'precipitationProbabilit'.tr, ), DescWeather( imageName: 'assets/images/water.png', value: statusImFa - .getPrecipitation(widget.rainSum![index]), + .getPrecipitation(widget.rainSum[index]), desc: 'rain'.tr, ), DescWeather( imageName: 'assets/images/rainfall.png', value: statusImFa.getPrecipitation( - widget.precipitationSum![index]), + widget.precipitationSum[index]), desc: 'precipitation'.tr, ), ], diff --git a/lib/app/widgets/list_daily_card.dart b/lib/app/widgets/list_daily_card.dart index 6878346..6aca996 100644 --- a/lib/app/widgets/list_daily_card.dart +++ b/lib/app/widgets/list_daily_card.dart @@ -7,15 +7,15 @@ import 'package:rain/app/widgets/status_im_fa.dart'; class ListCardDaily extends StatelessWidget { const ListCardDaily({ super.key, - this.timeDaily, - this.weathercodeDaily, - this.temperature2MMax, - this.temperature2MMin, + required this.timeDaily, + required this.weathercodeDaily, + required this.temperature2MMax, + required this.temperature2MMin, }); - final DateTime? timeDaily; - final int? weathercodeDaily; - final double? temperature2MMax; - final double? temperature2MMin; + final DateTime timeDaily; + final int weathercodeDaily; + final double temperature2MMax; + final double temperature2MMin; @override Widget build(BuildContext context) { @@ -38,7 +38,7 @@ class ListCardDaily extends StatelessWidget { crossAxisAlignment: CrossAxisAlignment.start, children: [ Text( - '${statusImFa.getDegree(temperature2MMin!.round())} / ${statusImFa.getDegree(temperature2MMax!.round())}', + '${statusImFa.getDegree(temperature2MMin.round())} / ${statusImFa.getDegree(temperature2MMax.round())}', style: context.theme.textTheme.titleLarge?.copyWith( fontSize: 22, fontWeight: FontWeight.w600, @@ -46,7 +46,7 @@ class ListCardDaily extends StatelessWidget { ), const SizedBox(height: 5), Text( - DateFormat.MMMMEEEEd(locale?.languageCode).format(timeDaily!), + DateFormat.MMMMEEEEd(locale?.languageCode).format(timeDaily), style: context.theme.textTheme.titleMedium?.copyWith( color: Colors.grey, fontWeight: FontWeight.w400, @@ -54,7 +54,7 @@ class ListCardDaily extends StatelessWidget { ), const SizedBox(height: 5), Text( - status.getText(weathercodeDaily!), + status.getText(weathercodeDaily), style: context.theme.textTheme.titleMedium?.copyWith( color: Colors.grey, fontWeight: FontWeight.w400, @@ -65,7 +65,7 @@ class ListCardDaily extends StatelessWidget { ), const SizedBox(width: 5), Image.asset( - status.getImageNowDaily(weathercodeDaily!, timeDaily!), + status.getImageNowDaily(weathercodeDaily, timeDaily), scale: 6.5, ), ], diff --git a/lib/app/widgets/weather_daily.dart b/lib/app/widgets/weather_daily.dart index 78f7470..d552245 100644 --- a/lib/app/widgets/weather_daily.dart +++ b/lib/app/widgets/weather_daily.dart @@ -47,51 +47,52 @@ class _WeatherDailyState extends State { child: ListView.builder( physics: const NeverScrollableScrollPhysics(), itemCount: 7, - itemBuilder: (ctx, i) { + itemBuilder: (ctx, index) { return InkWell( onTap: () => Get.to( () => DailyCard( timeDaily: widget.mainWeatherCache?.timeDaily ?? - widget.weatherCard?.timeDaily, + widget.weatherCard!.timeDaily!, weathercodeDaily: widget.mainWeatherCache?.weathercodeDaily ?? - widget.weatherCard?.weathercodeDaily, + widget.weatherCard!.weathercodeDaily!, temperature2MMax: widget.mainWeatherCache?.temperature2MMax ?? - widget.weatherCard?.temperature2MMax, + widget.weatherCard!.temperature2MMax!, temperature2MMin: widget.mainWeatherCache?.temperature2MMin ?? - widget.weatherCard?.temperature2MMin, + widget.weatherCard!.temperature2MMin!, apparentTemperatureMax: widget .mainWeatherCache?.apparentTemperatureMax ?? - widget.weatherCard?.apparentTemperatureMax, + widget.weatherCard!.apparentTemperatureMax!, apparentTemperatureMin: widget .mainWeatherCache?.apparentTemperatureMin ?? - widget.weatherCard?.apparentTemperatureMin, + widget.weatherCard!.apparentTemperatureMin!, sunrise: widget.mainWeatherCache?.sunrise ?? - widget.weatherCard?.sunrise, + widget.weatherCard!.sunrise!, sunset: widget.mainWeatherCache?.sunset ?? - widget.weatherCard?.sunset, + widget.weatherCard!.sunset!, precipitationSum: widget.mainWeatherCache?.precipitationSum ?? - widget.weatherCard?.precipitationSum, + widget.weatherCard!.precipitationSum!, precipitationProbabilityMax: widget.mainWeatherCache ?.precipitationProbabilityMax ?? - widget.weatherCard?.precipitationProbabilityMax, + widget + .weatherCard!.precipitationProbabilityMax!, windspeed10MMax: widget.mainWeatherCache?.windspeed10MMax ?? - widget.weatherCard?.windspeed10MMax, + widget.weatherCard!.windspeed10MMax!, windgusts10MMax: widget.mainWeatherCache?.windgusts10MMax ?? - widget.weatherCard?.windgusts10MMax, + widget.weatherCard!.windgusts10MMax!, uvIndexMax: widget.mainWeatherCache?.uvIndexMax ?? - widget.weatherCard?.uvIndexMax, - rainSum: widget.mainWeatherCache?.rainSum! ?? - widget.weatherCard?.rainSum, + widget.weatherCard!.uvIndexMax!, + rainSum: widget.mainWeatherCache?.rainSum ?? + widget.weatherCard!.rainSum!, winddirection10MDominant: widget.mainWeatherCache ?.winddirection10MDominant ?? - widget.weatherCard?.winddirection10MDominant, - index: i, + widget.weatherCard!.winddirection10MDominant!, + index: index, ), transition: Transition.downToUp), child: Container( @@ -102,8 +103,8 @@ class _WeatherDailyState extends State { Expanded( child: Text( DateFormat.EEEE(locale?.languageCode).format( - widget.mainWeatherCache?.timeDaily![i] ?? - widget.weatherCard!.timeDaily![i]), + widget.mainWeatherCache?.timeDaily?[index] ?? + widget.weatherCard!.timeDaily![index]), style: context.theme.textTheme.labelLarge, ), ), @@ -113,16 +114,18 @@ class _WeatherDailyState extends State { children: [ Image.asset( status.getImage7Day(widget.mainWeatherCache - ?.weathercodeDaily![i] ?? - widget.weatherCard!.weathercodeDaily![i]), + ?.weathercodeDaily?[index] ?? + widget + .weatherCard!.weathercodeDaily![index]), scale: 3, ), const SizedBox(width: 5), Expanded( child: Text( status.getText(widget.mainWeatherCache - ?.weathercodeDaily![i] ?? - widget.weatherCard!.weathercodeDaily![i]), + ?.weathercodeDaily?[index] ?? + widget.weatherCard! + .weathercodeDaily![index]), style: context.theme.textTheme.labelLarge, overflow: TextOverflow.ellipsis, ), @@ -135,10 +138,10 @@ class _WeatherDailyState extends State { mainAxisAlignment: MainAxisAlignment.end, children: [ Text( - statusImFa.getDegree(widget - .mainWeatherCache?.temperature2MMin![i] + statusImFa.getDegree(widget.mainWeatherCache + ?.temperature2MMin?[index] .round() ?? - widget.weatherCard!.temperature2MMin![i] + widget.weatherCard!.temperature2MMin![index] .round()), style: context.theme.textTheme.labelLarge, ), @@ -150,10 +153,10 @@ class _WeatherDailyState extends State { ), ), Text( - statusImFa.getDegree(widget - .mainWeatherCache?.temperature2MMax![i] + statusImFa.getDegree(widget.mainWeatherCache + ?.temperature2MMax?[index] .round() ?? - widget.weatherCard!.temperature2MMax![i] + widget.weatherCard!.temperature2MMax![index] .round()), style: context.theme.textTheme.bodyMedium ?.copyWith( diff --git a/lib/app/widgets/weather_more.dart b/lib/app/widgets/weather_more.dart index bf0e357..974691f 100644 --- a/lib/app/widgets/weather_more.dart +++ b/lib/app/widgets/weather_more.dart @@ -52,58 +52,58 @@ class _WeatherMoreState extends State { onTap: () => Get.to( () => DailyCard( timeDaily: widget.mainWeatherCache?.timeDaily ?? - widget.weatherCard?.timeDaily, + widget.weatherCard!.timeDaily!, weathercodeDaily: widget.mainWeatherCache?.weathercodeDaily ?? - widget.weatherCard?.weathercodeDaily, + widget.weatherCard!.weathercodeDaily!, temperature2MMax: widget.mainWeatherCache?.temperature2MMax ?? - widget.weatherCard?.temperature2MMax, + widget.weatherCard!.temperature2MMax!, temperature2MMin: widget.mainWeatherCache?.temperature2MMin ?? - widget.weatherCard?.temperature2MMin, + widget.weatherCard!.temperature2MMin!, apparentTemperatureMax: widget.mainWeatherCache?.apparentTemperatureMax ?? - widget.weatherCard?.apparentTemperatureMax, + widget.weatherCard!.apparentTemperatureMax!, apparentTemperatureMin: widget.mainWeatherCache?.apparentTemperatureMin ?? - widget.weatherCard?.apparentTemperatureMin, + widget.weatherCard!.apparentTemperatureMin!, sunrise: widget.mainWeatherCache?.sunrise ?? - widget.weatherCard?.sunrise, + widget.weatherCard!.sunrise!, sunset: widget.mainWeatherCache?.sunset ?? - widget.weatherCard?.sunset, + widget.weatherCard!.sunset!, precipitationSum: widget.mainWeatherCache?.precipitationSum ?? - widget.weatherCard?.precipitationSum, + widget.weatherCard!.precipitationSum!, precipitationProbabilityMax: widget.mainWeatherCache?.precipitationProbabilityMax ?? - widget.weatherCard?.precipitationProbabilityMax, + widget.weatherCard!.precipitationProbabilityMax!, windspeed10MMax: widget.mainWeatherCache?.windspeed10MMax ?? - widget.weatherCard?.windspeed10MMax, + widget.weatherCard!.windspeed10MMax!, windgusts10MMax: widget.mainWeatherCache?.windgusts10MMax ?? - widget.weatherCard?.windgusts10MMax, + widget.weatherCard!.windgusts10MMax!, uvIndexMax: widget.mainWeatherCache?.uvIndexMax ?? - widget.weatherCard?.uvIndexMax, + widget.weatherCard!.uvIndexMax!, rainSum: widget.mainWeatherCache?.rainSum ?? - widget.weatherCard?.rainSum, + widget.weatherCard!.rainSum!, winddirection10MDominant: widget.mainWeatherCache?.winddirection10MDominant ?? - widget.weatherCard?.winddirection10MDominant, + widget.weatherCard!.winddirection10MDominant!, index: index, ), transition: Transition.downToUp), child: ListCardDaily( timeDaily: widget.mainWeatherCache?.timeDaily![index] ?? - widget.weatherCard?.timeDaily![index], + widget.weatherCard!.timeDaily![index], weathercodeDaily: widget.mainWeatherCache?.weathercodeDaily![index] ?? - widget.weatherCard?.weathercodeDaily![index], + widget.weatherCard!.weathercodeDaily![index], temperature2MMax: widget.mainWeatherCache?.temperature2MMax![index] ?? - widget.weatherCard?.temperature2MMax![index], + widget.weatherCard!.temperature2MMax![index], temperature2MMin: widget.mainWeatherCache?.temperature2MMin![index] ?? - widget.weatherCard?.temperature2MMin![index], + widget.weatherCard!.temperature2MMin![index], ), ), ), From 739ae18b759e7abccddd46f5a9c08cc412c450aa Mon Sep 17 00:00:00 2001 From: Yoshi Date: Thu, 11 May 2023 15:16:25 +0300 Subject: [PATCH 006/234] update dart --- android/build.gradle | 2 +- pubspec.lock | 118 +++++++++++++++++++++---------------------- pubspec.yaml | 18 +++---- 3 files changed, 69 insertions(+), 69 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 58a8c74..e50c3a0 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -6,7 +6,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:7.2.0' + classpath 'com.android.tools.build:gradle:7.3.0' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } diff --git a/pubspec.lock b/pubspec.lock index c6ba032..06bbf05 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,18 +5,18 @@ packages: dependency: transitive description: name: _fe_analyzer_shared - sha256: "8880b4cfe7b5b17d57c052a5a3a8cc1d4f546261c7cc8fbd717bd53f48db0568" + sha256: "405666cd3cf0ee0a48d21ec67e65406aad2c726d9fa58840d3375e7bdcd32a07" url: "https://pub.dev" source: hosted - version: "59.0.0" + version: "60.0.0" analyzer: dependency: transitive description: name: analyzer - sha256: a89627f49b0e70e068130a36571409726b04dab12da7e5625941d2c8ec278b96 + sha256: "1952250bd005bacb895a01bf1b4dc00e3ba1c526cf47dca54dfe24979c65f5b3" url: "https://pub.dev" source: hosted - version: "5.11.1" + version: "5.12.0" archive: dependency: transitive description: @@ -37,10 +37,10 @@ packages: dependency: transitive description: name: async - sha256: bfe67ef28df125b7dddcea62755991f807aa39a2492a23e1550161692950bbe0 + sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" url: "https://pub.dev" source: hosted - version: "2.10.0" + version: "2.11.0" boolean_selector: dependency: transitive description: @@ -53,10 +53,10 @@ packages: dependency: transitive description: name: build - sha256: "3fbda25365741f8251b39f3917fb3c8e286a96fd068a5a242e11c2012d495777" + sha256: "43865b79fbb78532e4bff7c33087aa43b1d488c4fdef014eaef568af6d8016dc" url: "https://pub.dev" source: hosted - version: "2.3.1" + version: "2.4.0" build_config: dependency: transitive description: @@ -69,10 +69,10 @@ packages: dependency: transitive description: name: build_daemon - sha256: "757153e5d9cd88253cb13f28c2fb55a537dc31fefd98137549895b5beb7c6169" + sha256: "5f02d73eb2ba16483e693f80bee4f088563a820e47d1027d4cdfe62b5bb43e65" url: "https://pub.dev" source: hosted - version: "3.1.1" + version: "4.0.0" build_resolvers: dependency: transitive description: @@ -85,18 +85,18 @@ packages: dependency: "direct dev" description: name: build_runner - sha256: b0a8a7b8a76c493e85f1b84bffa0588859a06197863dba8c9036b15581fd9727 + sha256: "87e06c939450b9b94e3e1bb2d46e0e9780adbff5500d3969f2ba2de6bbb860cb" url: "https://pub.dev" source: hosted - version: "2.3.3" + version: "2.4.2" build_runner_core: dependency: transitive description: name: build_runner_core - sha256: "14febe0f5bac5ae474117a36099b4de6f1dbc52df6c5e55534b3da9591bf4292" + sha256: "30859c90e9ddaccc484f56303931f477b1f1ba2bab74aa32ed5d6ce15870f8cf" url: "https://pub.dev" source: hosted - version: "7.2.7" + version: "7.2.8" built_collection: dependency: transitive description: @@ -117,10 +117,10 @@ packages: dependency: transitive description: name: characters - sha256: e6a326c8af69605aec75ed6c187d06b349707a27fbff8222ca9cc2cff167975c + sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" url: "https://pub.dev" source: hosted - version: "1.2.1" + version: "1.3.0" checked_yaml: dependency: transitive description: @@ -157,18 +157,18 @@ packages: dependency: transitive description: name: collection - sha256: cfc915e6923fe5ce6e153b0723c753045de46de1b4d63771530504004a45fae0 + sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c" url: "https://pub.dev" source: hosted - version: "1.17.0" + version: "1.17.1" connectivity_plus: dependency: "direct main" description: name: connectivity_plus - sha256: b74247fad72c171381dbe700ca17da24deac637ab6d43c343b42867acb95c991 + sha256: "45262924896ff72a8cd92b722bb7e3d5020f9e0724531a3e10e22ddae2005991" url: "https://pub.dev" source: hosted - version: "3.0.6" + version: "4.0.0" connectivity_plus_platform_interface: dependency: transitive description: @@ -237,10 +237,10 @@ packages: dependency: "direct main" description: name: dio - sha256: "0894a098594263fe1caaba3520e3016d8a855caeb010a882273189cca10f11e9" + sha256: "347d56c26d63519552ef9a569f2a593dda99a81fdbdff13c584b7197cfe05059" url: "https://pub.dev" source: hosted - version: "5.1.1" + version: "5.1.2" dynamic_color: dependency: "direct main" description: @@ -261,10 +261,10 @@ packages: dependency: transitive description: name: ffi - sha256: a38574032c5f1dd06c4aee541789906c12ccaab8ba01446e800d9c5b79c4a978 + sha256: ed5337a5660c506388a9f012be0288fb38b49020ce2b45fe1f8b8323fe429f99 url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "2.0.2" file: dependency: transitive description: @@ -481,10 +481,10 @@ packages: dependency: transitive description: name: graphs - sha256: f9e130f3259f52d26f0cfc0e964513796dafed572fa52e45d2f8d6ca14db39b2 + sha256: "772db3d53d23361d4ffcf5a9bb091cf3ee9b22f2be52cd107cd7a2683a89ba0e" url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.3.0" home_widget: dependency: "direct main" description: @@ -553,10 +553,10 @@ packages: dependency: "direct main" description: name: intl - sha256: "910f85bce16fb5c6f614e117efa303e85a1731bb0081edf3604a2ae6e9a3cc91" + sha256: a3715e3bc90294e971cb7dc063fbf3cd9ee0ebf8604ffeafabd9e6f16abbdbe6 url: "https://pub.dev" source: hosted - version: "0.17.0" + version: "0.18.0" io: dependency: transitive description: @@ -593,10 +593,10 @@ packages: dependency: transitive description: name: js - sha256: "5528c2f391ededb7775ec1daa69e65a2d61276f7552de2b5f7b8d34ee9fd4ab7" + sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 url: "https://pub.dev" source: hosted - version: "0.6.5" + version: "0.6.7" json_annotation: dependency: transitive description: @@ -617,10 +617,10 @@ packages: dependency: transitive description: name: lints - sha256: "5e4a9cd06d447758280a8ac2405101e0e2094d2a1dbdd3756aec3fe7775ba593" + sha256: "6b0206b0bf4f04961fc5438198ccb3a885685cd67d4d4a32cc20ad7f8adbe015" url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "2.1.0" logging: dependency: transitive description: @@ -633,10 +633,10 @@ packages: dependency: transitive description: name: matcher - sha256: "16db949ceee371e9b99d22f88fa3a73c4e59fd0afed0bd25fc336eb76c198b72" + sha256: "6501fbd55da300384b768785b83e5ce66991266cec21af89ab9ae7f5ce1c4cbb" url: "https://pub.dev" source: hosted - version: "0.12.13" + version: "0.12.15" material_color_utilities: dependency: "direct main" description: @@ -649,10 +649,10 @@ packages: dependency: transitive description: name: meta - sha256: "6c268b42ed578a53088d834796959e4a1814b5e9e164f147f580a386e5decf42" + sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3" url: "https://pub.dev" source: hosted - version: "1.8.0" + version: "1.9.1" mime: dependency: transitive description: @@ -681,10 +681,10 @@ packages: dependency: "direct main" description: name: package_info_plus - sha256: "10259b111176fba5c505b102e3a5b022b51dd97e30522e906d6922c745584745" + sha256: d39e8fbff4c5aef4592737e25ad6ac500df006ce7a7a8e1f838ce1256e167542 url: "https://pub.dev" source: hosted - version: "3.1.2" + version: "4.0.0" package_info_plus_platform_interface: dependency: transitive description: @@ -697,18 +697,18 @@ packages: dependency: transitive description: name: path - sha256: db9d4f58c908a4ba5953fcee2ae317c94889433e5024c27ce74a37f94267945b + sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" url: "https://pub.dev" source: hosted - version: "1.8.2" + version: "1.8.3" path_provider: dependency: "direct main" description: name: path_provider - sha256: c7edf82217d4b2952b2129a61d3ad60f1075b9299e629e149a8d2e39c2e6aad4 + sha256: "3087813781ab814e4157b172f1a11c46be20179fcc9bea043e0fba36bc0acaa2" url: "https://pub.dev" source: hosted - version: "2.0.14" + version: "2.0.15" path_provider_android: dependency: transitive description: @@ -721,10 +721,10 @@ packages: dependency: transitive description: name: path_provider_foundation - sha256: ad4c4d011830462633f03eb34445a45345673dfd4faf1ab0b4735fbd93b19183 + sha256: "1995d88ec2948dac43edf8fe58eb434d35d22a2940ecee1a9fefcd62beee6eb3" url: "https://pub.dev" source: hosted - version: "2.2.2" + version: "2.2.3" path_provider_linux: dependency: transitive description: @@ -753,10 +753,10 @@ packages: dependency: transitive description: name: petitparser - sha256: "49392a45ced973e8d94a85fdb21293fbb40ba805fc49f2965101ae748a3683b4" + sha256: cb3798bef7fc021ac45b308f4b51208a152792445cce0448c9a4ba5879dd8750 url: "https://pub.dev" source: hosted - version: "5.1.0" + version: "5.4.0" platform: dependency: transitive description: @@ -817,10 +817,10 @@ packages: dependency: "direct main" description: name: scrollable_positioned_list - sha256: "3806b84fa3da65e47146252061d20d12ce254560a6ad098d24b6bad19e079e5d" + sha256: "1b54d5f1329a1e263269abc9e2543d90806131aa14fe7c6062a8054d57249287" url: "https://pub.dev" source: hosted - version: "0.3.7" + version: "0.3.8" shelf: dependency: transitive description: @@ -854,10 +854,10 @@ packages: dependency: transitive description: name: source_gen - sha256: b20e191de6964e98032573cecb1d2b169d96ba63fdb586d24dcd1003ba7e94f6 + sha256: "378a173055cd1fcd2a36e94bf254786d6812688b5f53b6038a2fd180a5a5e210" url: "https://pub.dev" source: hosted - version: "1.3.0" + version: "1.3.1" source_span: dependency: transitive description: @@ -910,10 +910,10 @@ packages: dependency: transitive description: name: test_api - sha256: ad540f65f92caa91bf21dfc8ffb8c589d6e4dc0c2267818b4cc2792857706206 + sha256: eb6ac1540b26de412b3403a163d919ba86f6a973fe6cc50ae3541b80092fdcfb url: "https://pub.dev" source: hosted - version: "0.4.16" + version: "0.5.1" time: dependency: transitive description: @@ -942,10 +942,10 @@ packages: dependency: transitive description: name: typed_data - sha256: "26f87ade979c47a150c9eaab93ccd2bebe70a27dc0b4b29517f2904f04eb11a5" + sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c url: "https://pub.dev" source: hosted - version: "1.3.1" + version: "1.3.2" universal_io: dependency: transitive description: @@ -958,10 +958,10 @@ packages: dependency: "direct main" description: name: url_launcher - sha256: "75f2846facd11168d007529d6cd8fcb2b750186bea046af9711f10b907e1587e" + sha256: eb1e00ab44303d50dd487aab67ebc575456c146c6af44422f9c13889984c00f3 url: "https://pub.dev" source: hosted - version: "6.1.10" + version: "6.1.11" url_launcher_android: dependency: transitive description: @@ -1062,10 +1062,10 @@ packages: dependency: transitive description: name: xml - sha256: "979ee37d622dec6365e2efa4d906c37470995871fe9ae080d967e192d88286b5" + sha256: "5bc72e1e45e941d825fd7468b9b4cc3b9327942649aeb6fc5cdbf135f0a86e84" url: "https://pub.dev" source: hosted - version: "6.2.2" + version: "6.3.0" xxh3: dependency: transitive description: @@ -1083,5 +1083,5 @@ packages: source: hosted version: "3.1.2" sdks: - dart: ">=2.19.6 <3.0.0" + dart: ">=3.0.0 <4.0.0" flutter: ">=3.4.0-17.0.pre" diff --git a/pubspec.yaml b/pubspec.yaml index 0bdf6bf..0da6a62 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -6,7 +6,7 @@ publish_to: "none" version: 1.1.10+21 environment: - sdk: ">=2.19.6 <3.0.0" + sdk: ">=3.0.0 <4.0.0" dependencies: flutter: @@ -14,8 +14,8 @@ dependencies: flutter_localizations: sdk: flutter get: ^4.6.5 - dio: ^5.1.1 - intl: ^0.17.0 + dio: ^5.1.2 + intl: ^0.18.0 isar: ^3.1.0+1 shimmer: ^2.0.0 iconsax: ^0.0.8 @@ -23,19 +23,19 @@ dependencies: geocoding: ^2.1.0 geolocator: ^9.0.2 flutter_glow: ^0.3.0 - url_launcher: ^6.1.10 + url_launcher: ^6.1.11 dynamic_color: ^1.6.3 home_widget: ^0.2.0+1 - path_provider: ^2.0.14 - package_info_plus: ^3.1.2 - connectivity_plus: ^3.0.6 + path_provider: ^2.0.15 + package_info_plus: ^4.0.0 + connectivity_plus: ^4.0.0 isar_flutter_libs: ^3.1.0+1 flutter_displaymode: ^0.6.0 lat_lng_to_timezone: ^0.2.0 custom_navigation_bar: ^0.8.2 flutter_native_timezone: ^2.0.0 material_color_utilities: ^0.2.0 - scrollable_positioned_list: ^0.3.7 + scrollable_positioned_list: ^0.3.8 flutter_local_notifications: ^14.0.0+1 internet_connection_checker: ^1.0.0+1 @@ -43,7 +43,7 @@ dev_dependencies: flutter_test: sdk: flutter flutter_lints: ^2.0.1 - build_runner: ^2.3.3 + build_runner: ^2.4.2 isar_generator: ^3.1.0+1 flutter_native_splash: ^2.2.19 flutter_launcher_icons: ^0.13.1 From f1d2a6e36c51ae44053b0feb0c56e07548aadc4e Mon Sep 17 00:00:00 2001 From: Yoshi Date: Thu, 11 May 2023 19:01:02 +0300 Subject: [PATCH 007/234] fix --- android/build.gradle | 2 +- lib/main.dart | 4 +-- macos/Flutter/GeneratedPluginRegistrant.swift | 4 +-- pubspec.lock | 36 ++++++++----------- pubspec.yaml | 7 ++-- 5 files changed, 22 insertions(+), 31 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index e50c3a0..f7eb7f6 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -26,6 +26,6 @@ subprojects { project.evaluationDependsOn(':app') } -task clean(type: Delete) { +tasks.register("clean", Delete) { delete rootProject.buildDir } diff --git a/lib/main.dart b/lib/main.dart index e607fc7..1d27237 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -4,7 +4,7 @@ import 'package:flutter/material.dart'; import 'package:flutter_displaymode/flutter_displaymode.dart'; import 'package:flutter_local_notifications/flutter_local_notifications.dart'; import 'package:flutter_localizations/flutter_localizations.dart'; -import 'package:flutter_native_timezone/flutter_native_timezone.dart'; +import 'package:flutter_timezone/flutter_timezone.dart'; import 'package:get/get.dart'; import 'package:internet_connection_checker/internet_connection_checker.dart'; import 'package:isar/isar.dart'; @@ -40,7 +40,7 @@ void main() async { isDeviceConnectedNotifier.value = Future(() => false); } }); - final String timeZoneName = await FlutterNativeTimezone.getLocalTimezone(); + final String timeZoneName = await FlutterTimezone.getLocalTimezone(); const AndroidInitializationSettings initializationSettingsAndroid = AndroidInitializationSettings('@mipmap/ic_launcher'); const InitializationSettings initializationSettings = diff --git a/macos/Flutter/GeneratedPluginRegistrant.swift b/macos/Flutter/GeneratedPluginRegistrant.swift index c5ca839..be7a1ec 100644 --- a/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/macos/Flutter/GeneratedPluginRegistrant.swift @@ -8,7 +8,7 @@ import Foundation import connectivity_plus import dynamic_color import flutter_local_notifications -import flutter_native_timezone +import flutter_timezone import geolocator_apple import isar_flutter_libs import package_info_plus @@ -19,7 +19,7 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { ConnectivityPlugin.register(with: registry.registrar(forPlugin: "ConnectivityPlugin")) DynamicColorPlugin.register(with: registry.registrar(forPlugin: "DynamicColorPlugin")) FlutterLocalNotificationsPlugin.register(with: registry.registrar(forPlugin: "FlutterLocalNotificationsPlugin")) - FlutterNativeTimezonePlugin.register(with: registry.registrar(forPlugin: "FlutterNativeTimezonePlugin")) + FlutterTimezonePlugin.register(with: registry.registrar(forPlugin: "FlutterTimezonePlugin")) GeolocatorPlugin.register(with: registry.registrar(forPlugin: "GeolocatorPlugin")) IsarFlutterLibsPlugin.register(with: registry.registrar(forPlugin: "IsarFlutterLibsPlugin")) FLTPackageInfoPlusPlugin.register(with: registry.registrar(forPlugin: "FLTPackageInfoPlusPlugin")) diff --git a/pubspec.lock b/pubspec.lock index 06bbf05..9ec5495 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -322,26 +322,26 @@ packages: dependency: "direct main" description: name: flutter_local_notifications - sha256: "2876372952b65ca7f684e698eba22bda1cf581fa071dd30ba2f01900f507d0d1" + sha256: ee6ee56855aa920899b68586b538474d086c149932220b47b92502cbfb5ba5e5 url: "https://pub.dev" source: hosted - version: "14.0.0+1" + version: "14.0.0+2" flutter_local_notifications_linux: dependency: transitive description: name: flutter_local_notifications_linux - sha256: "909bb95de05a2e793503a2437146285a2f600cd0b3f826e26b870a334d8586d7" + sha256: "33f741ef47b5f63cc7f78fe75eeeac7e19f171ff3c3df054d84c1e38bedb6a03" url: "https://pub.dev" source: hosted - version: "4.0.0" + version: "4.0.0+1" flutter_local_notifications_platform_interface: dependency: transitive description: name: flutter_local_notifications_platform_interface - sha256: "63235c42de5b6c99846969a27ad0209c401e6b77b0498939813725b5791c107c" + sha256: "7cf643d6d5022f3baed0be777b0662cce5919c0a7b86e700299f22dc4ae660ef" url: "https://pub.dev" source: hosted - version: "7.0.0" + version: "7.0.0+1" flutter_localizations: dependency: "direct main" description: flutter @@ -355,19 +355,19 @@ packages: url: "https://pub.dev" source: hosted version: "2.2.19" - flutter_native_timezone: - dependency: "direct main" - description: - name: flutter_native_timezone - sha256: ed7bfb982f036243de1c068e269182a877100c994f05143c8b26a325e28c1b02 - url: "https://pub.dev" - source: hosted - version: "2.0.0" flutter_test: dependency: "direct dev" description: flutter source: sdk version: "0.0.0" + flutter_timezone: + dependency: "direct main" + description: + name: flutter_timezone + sha256: "9b179c76cbded894e3208b420d0c4286f6c9ab7178c063eba8bc4266a3ee1a3c" + url: "https://pub.dev" + source: hosted + version: "1.0.6" flutter_web_plugins: dependency: transitive description: flutter @@ -485,14 +485,6 @@ packages: url: "https://pub.dev" source: hosted version: "2.3.0" - home_widget: - dependency: "direct main" - description: - name: home_widget - sha256: c7a57566606ce702454f074a0b933ee156f05ea6ef1f79f4cb680a171afe59dd - url: "https://pub.dev" - source: hosted - version: "0.2.0+1" html: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 0da6a62..ced422b 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -3,7 +3,7 @@ description: Weather app. publish_to: "none" -version: 1.1.10+21 +version: 1.1.11+22 environment: sdk: ">=3.0.0 <4.0.0" @@ -25,18 +25,17 @@ dependencies: flutter_glow: ^0.3.0 url_launcher: ^6.1.11 dynamic_color: ^1.6.3 - home_widget: ^0.2.0+1 path_provider: ^2.0.15 + flutter_timezone: ^1.0.6 package_info_plus: ^4.0.0 connectivity_plus: ^4.0.0 isar_flutter_libs: ^3.1.0+1 flutter_displaymode: ^0.6.0 lat_lng_to_timezone: ^0.2.0 custom_navigation_bar: ^0.8.2 - flutter_native_timezone: ^2.0.0 material_color_utilities: ^0.2.0 scrollable_positioned_list: ^0.3.8 - flutter_local_notifications: ^14.0.0+1 + flutter_local_notifications: ^14.0.0+2 internet_connection_checker: ^1.0.0+1 dev_dependencies: From e14573c0d2f02d9e26e01cb1c17c6f20e3c03d96 Mon Sep 17 00:00:00 2001 From: Yoshi Date: Wed, 17 May 2023 22:25:36 +0300 Subject: [PATCH 008/234] fix package name --- android/app/src/debug/AndroidManifest.xml | 2 +- android/app/src/main/AndroidManifest.xml | 2 +- .../{example => yoshi}/rain/MainActivity.kt | 2 +- android/app/src/profile/AndroidManifest.xml | 2 +- pubspec.lock | 36 +++++---- pubspec.yaml | 9 ++- web/index.html | 74 ++++++++++++++++++- 7 files changed, 101 insertions(+), 26 deletions(-) rename android/app/src/main/kotlin/com/{example => yoshi}/rain/MainActivity.kt (79%) diff --git a/android/app/src/debug/AndroidManifest.xml b/android/app/src/debug/AndroidManifest.xml index dbf2df7..247fd99 100644 --- a/android/app/src/debug/AndroidManifest.xml +++ b/android/app/src/debug/AndroidManifest.xml @@ -1,5 +1,5 @@ + package="com.yoshi.rain"> - + - + + + - + + - +