From f880c5d274c9257098102148a94ffa0822a059d2 Mon Sep 17 00:00:00 2001 From: Yoshi Date: Sun, 2 Mar 2025 15:58:04 +0300 Subject: [PATCH] Update dependencies and delete support --- .gitignore | 3 +- lib/app/ui/settings/view/settings.dart | 857 ++++++++++++++----------- lib/main.dart | 116 ++-- pubspec.lock | 179 +++--- pubspec.yaml | 24 +- 5 files changed, 652 insertions(+), 527 deletions(-) diff --git a/.gitignore b/.gitignore index 4314849..f76f15e 100644 --- a/.gitignore +++ b/.gitignore @@ -15,6 +15,7 @@ migrate_working_dir/ *.ipr *.iws .idea/ +.cxx/ # The .vscode folder contains launch configuration and tasks you configure in # VS Code which you may wish to be included in version control, so this line @@ -41,4 +42,4 @@ app.*.map.json # Android Studio will place build artifacts here /android/app/debug /android/app/profile -/android/app/release \ No newline at end of file +/android/app/release diff --git a/lib/app/ui/settings/view/settings.dart b/lib/app/ui/settings/view/settings.dart index f227b62..efd316a 100644 --- a/lib/app/ui/settings/view/settings.dart +++ b/lib/app/ui/settings/view/settings.dart @@ -69,7 +69,8 @@ class _SettingsPageState extends State { builder: (BuildContext context) { return Padding( padding: EdgeInsets.only( - bottom: MediaQuery.of(context).padding.bottom), + bottom: MediaQuery.of(context).padding.bottom, + ), child: StatefulBuilder( builder: (BuildContext context, setState) { return SingleChildScrollView( @@ -78,8 +79,9 @@ class _SettingsPageState extends State { mainAxisSize: MainAxisSize.min, children: [ Padding( - padding: - const EdgeInsets.symmetric(vertical: 15), + padding: const EdgeInsets.symmetric( + vertical: 15, + ), child: Text( 'appearance'.tr, style: context.textTheme.titleLarge?.copyWith( @@ -96,7 +98,7 @@ class _SettingsPageState extends State { dropdownList: [ 'system'.tr, 'dark'.tr, - 'light'.tr + 'light'.tr, ], dropdownCange: (String? newValue) { final newThemeMode = newValue?.tr; @@ -106,11 +108,12 @@ class _SettingsPageState extends State { newThemeMode == systemTheme ? ThemeMode.system : newThemeMode == darkTheme - ? ThemeMode.dark - : ThemeMode.light; - String theme = newThemeMode == systemTheme - ? 'system' - : newThemeMode == darkTheme + ? ThemeMode.dark + : ThemeMode.light; + String theme = + newThemeMode == systemTheme + ? 'system' + : newThemeMode == darkTheme ? 'dark' : 'light'; themeController.saveTheme(theme); @@ -126,8 +129,10 @@ class _SettingsPageState extends State { value: settings.amoledTheme, onChange: (value) { themeController.saveOledTheme(value); - MyApp.updateAppState(context, - newAmoledTheme: value); + MyApp.updateAppState( + context, + newAmoledTheme: value, + ); }, ), SettingCard( @@ -138,8 +143,10 @@ class _SettingsPageState extends State { value: settings.materialColor, onChange: (value) { themeController.saveMaterialTheme(value); - MyApp.updateAppState(context, - newMaterialColor: value); + MyApp.updateAppState( + context, + newMaterialColor: value, + ); }, ), SettingCard( @@ -180,7 +187,8 @@ class _SettingsPageState extends State { builder: (BuildContext context) { return Padding( padding: EdgeInsets.only( - bottom: MediaQuery.of(context).padding.bottom), + bottom: MediaQuery.of(context).padding.bottom, + ), child: StatefulBuilder( builder: (BuildContext context, setState) { return SingleChildScrollView( @@ -189,8 +197,9 @@ class _SettingsPageState extends State { mainAxisSize: MainAxisSize.min, children: [ Padding( - padding: - const EdgeInsets.symmetric(vertical: 15), + padding: const EdgeInsets.symmetric( + vertical: 15, + ), child: Text( 'functions'.tr, style: context.textTheme.titleLarge?.copyWith( @@ -206,8 +215,8 @@ class _SettingsPageState extends State { value: settings.location, onChange: (value) async { if (value) { - bool serviceEnabled = await Geolocator - .isLocationServiceEnabled(); + bool serviceEnabled = + await Geolocator.isLocationServiceEnabled(); if (!serviceEnabled) { if (!context.mounted) return; await showAdaptiveDialog( @@ -219,34 +228,40 @@ class _SettingsPageState extends State { style: context.textTheme.titleLarge, ), - content: Text('no_location'.tr, - style: context - .textTheme.titleMedium), + content: Text( + 'no_location'.tr, + style: + context.textTheme.titleMedium, + ), actions: [ TextButton( - onPressed: () => - Get.back(result: false), + onPressed: + () => + Get.back(result: false), child: Text( 'cancel'.tr, style: context - .textTheme.titleMedium + .textTheme + .titleMedium ?.copyWith( - color: Colors - .blueAccent), + color: + Colors.blueAccent, + ), ), ), TextButton( onPressed: () { - Geolocator - .openLocationSettings(); + Geolocator.openLocationSettings(); Get.back(result: true); }, child: Text( 'settings'.tr, style: context - .textTheme.titleMedium + .textTheme + .titleMedium ?.copyWith( - color: Colors.green), + color: Colors.green, + ), ), ), ], @@ -268,7 +283,8 @@ class _SettingsPageState extends State { SettingCard( elevation: 4, icon: const Icon( - IconsaxPlusLinear.notification_1), + IconsaxPlusLinear.notification_1, + ), text: 'notifications'.tr, switcher: true, value: settings.notifications, @@ -276,17 +292,21 @@ class _SettingsPageState extends State { final resultExact = await flutterLocalNotificationsPlugin .resolvePlatformSpecificImplementation< - AndroidFlutterLocalNotificationsPlugin>() + AndroidFlutterLocalNotificationsPlugin + >() ?.requestExactAlarmsPermission(); - final result = Platform.isIOS - ? await flutterLocalNotificationsPlugin - .resolvePlatformSpecificImplementation< - IOSFlutterLocalNotificationsPlugin>() - ?.requestPermissions() - : await flutterLocalNotificationsPlugin - .resolvePlatformSpecificImplementation< - AndroidFlutterLocalNotificationsPlugin>() - ?.requestNotificationsPermission(); + final result = + Platform.isIOS + ? await flutterLocalNotificationsPlugin + .resolvePlatformSpecificImplementation< + IOSFlutterLocalNotificationsPlugin + >() + ?.requestPermissions() + : await flutterLocalNotificationsPlugin + .resolvePlatformSpecificImplementation< + AndroidFlutterLocalNotificationsPlugin + >() + ?.requestNotificationsPermission(); if (result != null && resultExact != null) { isar.writeTxnSync(() { settings.notifications = value; @@ -294,7 +314,8 @@ class _SettingsPageState extends State { }); if (value) { weatherController.notification( - weatherController.mainWeather); + weatherController.mainWeather, + ); } else { flutterLocalNotificationsPlugin .cancelAll(); @@ -306,7 +327,8 @@ class _SettingsPageState extends State { SettingCard( elevation: 4, icon: const Icon( - IconsaxPlusLinear.notification_status), + IconsaxPlusLinear.notification_status, + ), text: 'timeRange'.tr, dropdown: true, dropdownName: '$timeRange', @@ -322,12 +344,15 @@ class _SettingsPageState extends State { settings.timeRange = int.parse(newValue!); isar.settings.putSync(settings); }); - MyApp.updateAppState(context, - newTimeRange: int.parse(newValue!)); + MyApp.updateAppState( + context, + newTimeRange: int.parse(newValue!), + ); if (settings.notifications) { flutterLocalNotificationsPlugin.cancelAll(); weatherController.notification( - weatherController.mainWeather); + weatherController.mainWeather, + ); } }, ), @@ -338,55 +363,73 @@ class _SettingsPageState extends State { info: true, infoSettings: true, infoWidget: _TextInfo( - info: settings.timeformat == '12' - ? DateFormat.jm(locale.languageCode) - .format( - DateFormat.Hm(locale.languageCode) - .parse(weatherController - .timeConvert(timeStart) - .format(context))) - : DateFormat.Hm(locale.languageCode) - .format( - DateFormat.Hm(locale.languageCode) - .parse(weatherController - .timeConvert(timeStart) - .format(context))), + info: + settings.timeformat == '12' + ? DateFormat.jm( + locale.languageCode, + ).format( + DateFormat.Hm( + locale.languageCode, + ).parse( + weatherController + .timeConvert(timeStart) + .format(context), + ), + ) + : DateFormat.Hm( + locale.languageCode, + ).format( + DateFormat.Hm( + locale.languageCode, + ).parse( + weatherController + .timeConvert(timeStart) + .format(context), + ), + ), ), onPressed: () async { final TimeOfDay? timeStartPicker = await showTimePicker( - context: context, - initialTime: weatherController - .timeConvert(timeStart), - builder: (context, child) { - final Widget mediaQueryWrapper = - MediaQuery( - data: MediaQuery.of(context).copyWith( - alwaysUse24HourFormat: - settings.timeformat == '12' - ? false - : true, - ), - child: child!, + context: context, + initialTime: weatherController + .timeConvert(timeStart), + builder: (context, child) { + final Widget mediaQueryWrapper = + MediaQuery( + data: MediaQuery.of( + context, + ).copyWith( + alwaysUse24HourFormat: + settings.timeformat == + '12' + ? false + : true, + ), + child: child!, + ); + return mediaQueryWrapper; + }, ); - return mediaQueryWrapper; - }, - ); if (timeStartPicker != null) { isar.writeTxnSync(() { - settings.timeStart = - timeStartPicker.format(context); + settings.timeStart = timeStartPicker + .format(context); isar.settings.putSync(settings); }); if (!context.mounted) return; - MyApp.updateAppState(context, - newTimeStart: - timeStartPicker.format(context)); + MyApp.updateAppState( + context, + newTimeStart: timeStartPicker.format( + context, + ), + ); if (settings.notifications) { flutterLocalNotificationsPlugin .cancelAll(); weatherController.notification( - weatherController.mainWeather); + weatherController.mainWeather, + ); } } }, @@ -398,55 +441,72 @@ class _SettingsPageState extends State { info: true, infoSettings: true, infoWidget: _TextInfo( - info: settings.timeformat == '12' - ? DateFormat.jm(locale.languageCode) - .format( - DateFormat.Hm(locale.languageCode) - .parse(weatherController - .timeConvert(timeEnd) - .format(context))) - : DateFormat.Hm(locale.languageCode) - .format( - DateFormat.Hm(locale.languageCode) - .parse(weatherController - .timeConvert(timeEnd) - .format(context))), + info: + settings.timeformat == '12' + ? DateFormat.jm( + locale.languageCode, + ).format( + DateFormat.Hm( + locale.languageCode, + ).parse( + weatherController + .timeConvert(timeEnd) + .format(context), + ), + ) + : DateFormat.Hm( + locale.languageCode, + ).format( + DateFormat.Hm( + locale.languageCode, + ).parse( + weatherController + .timeConvert(timeEnd) + .format(context), + ), + ), ), onPressed: () async { final TimeOfDay? timeEndPicker = await showTimePicker( - context: context, - initialTime: - weatherController.timeConvert(timeEnd), - builder: (context, child) { - final Widget mediaQueryWrapper = - MediaQuery( - data: MediaQuery.of(context).copyWith( - alwaysUse24HourFormat: - settings.timeformat == '12' - ? false - : true, - ), - child: child!, + context: context, + initialTime: weatherController + .timeConvert(timeEnd), + builder: (context, child) { + final Widget mediaQueryWrapper = + MediaQuery( + data: MediaQuery.of( + context, + ).copyWith( + alwaysUse24HourFormat: + settings.timeformat == + '12' + ? false + : true, + ), + child: child!, + ); + return mediaQueryWrapper; + }, ); - return mediaQueryWrapper; - }, - ); if (timeEndPicker != null) { isar.writeTxnSync(() { - settings.timeEnd = - timeEndPicker.format(context); + settings.timeEnd = timeEndPicker.format( + context, + ); isar.settings.putSync(settings); }); if (!context.mounted) return; - MyApp.updateAppState(context, - newTimeEnd: - timeEndPicker.format(context)); + MyApp.updateAppState( + context, + newTimeEnd: timeEndPicker.format(context), + ); if (settings.notifications) { flutterLocalNotificationsPlugin .cancelAll(); weatherController.notification( - weatherController.mainWeather); + weatherController.mainWeather, + ); } } }, @@ -471,7 +531,8 @@ class _SettingsPageState extends State { builder: (BuildContext context) { return Padding( padding: EdgeInsets.only( - bottom: MediaQuery.of(context).padding.bottom), + bottom: MediaQuery.of(context).padding.bottom, + ), child: StatefulBuilder( builder: (BuildContext context, setState) { return SingleChildScrollView( @@ -480,8 +541,9 @@ class _SettingsPageState extends State { mainAxisSize: MainAxisSize.min, children: [ Padding( - padding: - const EdgeInsets.symmetric(vertical: 15), + padding: const EdgeInsets.symmetric( + vertical: 15, + ), child: Text( 'data'.tr, style: context.textTheme.titleLarge?.copyWith( @@ -515,13 +577,14 @@ class _SettingsPageState extends State { dropdownName: settings.degrees.tr, dropdownList: [ 'celsius'.tr, - 'fahrenheit'.tr + 'fahrenheit'.tr, ], dropdownCange: (String? newValue) async { isar.writeTxnSync(() { - settings.degrees = newValue == 'celsius'.tr - ? 'celsius' - : 'fahrenheit'; + settings.degrees = + newValue == 'celsius'.tr + ? 'celsius' + : 'fahrenheit'; isar.settings.putSync(settings); }); await weatherController.deleteAll(false); @@ -538,7 +601,7 @@ class _SettingsPageState extends State { dropdownName: settings.measurements.tr, dropdownList: [ 'metric'.tr, - 'imperial'.tr + 'imperial'.tr, ], dropdownCange: (String? newValue) async { isar.writeTxnSync(() { @@ -622,7 +685,8 @@ class _SettingsPageState extends State { builder: (BuildContext context) { return Padding( padding: EdgeInsets.only( - bottom: MediaQuery.of(context).padding.bottom), + bottom: MediaQuery.of(context).padding.bottom, + ), child: StatefulBuilder( builder: (BuildContext context, setState) { return SingleChildScrollView( @@ -631,8 +695,9 @@ class _SettingsPageState extends State { mainAxisSize: MainAxisSize.min, children: [ Padding( - padding: - const EdgeInsets.symmetric(vertical: 15), + padding: const EdgeInsets.symmetric( + vertical: 15, + ), child: Text( 'widget'.tr, style: context.textTheme.titleLarge?.copyWith( @@ -655,8 +720,9 @@ class _SettingsPageState extends State { ), SettingCard( elevation: 4, - icon: - const Icon(IconsaxPlusLinear.bucket_square), + icon: const Icon( + IconsaxPlusLinear.bucket_square, + ), text: 'widgetBackground'.tr, info: true, infoWidget: CircleAvatar( @@ -667,7 +733,8 @@ class _SettingsPageState extends State { widgetBackgroundColor.isEmpty ? context.theme.primaryColor : HexColor.fromHex( - widgetBackgroundColor), + widgetBackgroundColor, + ), radius: 10, ), ), @@ -675,74 +742,89 @@ class _SettingsPageState extends State { colorBackground = null; showDialog( context: context, - builder: (context) => Dialog( - child: SingleChildScrollView( - child: Column( - mainAxisSize: MainAxisSize.min, - crossAxisAlignment: - CrossAxisAlignment.center, - children: [ - Padding( - padding: - const EdgeInsets.symmetric( - vertical: 15), - child: Text( - 'widgetBackground'.tr, - style: context - .textTheme.titleMedium - ?.copyWith(fontSize: 18), - ), - ), - Padding( - padding: - const EdgeInsets.symmetric( - horizontal: 15), - child: Theme( - data: context.theme.copyWith( - inputDecorationTheme: - InputDecorationTheme( - border: OutlineInputBorder( - borderRadius: - BorderRadius.circular( - 8), + builder: + (context) => Dialog( + child: SingleChildScrollView( + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: + CrossAxisAlignment.center, + children: [ + Padding( + padding: + const EdgeInsets.symmetric( + vertical: 15, + ), + child: Text( + 'widgetBackground'.tr, + style: context + .textTheme + .titleMedium + ?.copyWith( + fontSize: 18, + ), + ), + ), + Padding( + padding: + const EdgeInsets.symmetric( + horizontal: 15, + ), + child: Theme( + data: context.theme.copyWith( + inputDecorationTheme: + InputDecorationTheme( + border: OutlineInputBorder( + borderRadius: + BorderRadius.circular( + 8, + ), + ), + ), + ), + child: ColorPicker( + color: + widgetBackgroundColor + .isEmpty + ? context + .theme + .primaryColor + : HexColor.fromHex( + widgetBackgroundColor, + ), + onChanged: (pickedColor) { + colorBackground = + pickedColor.toHex(); + }, ), ), ), - child: ColorPicker( - color: widgetBackgroundColor - .isEmpty - ? context - .theme.primaryColor - : HexColor.fromHex( - widgetBackgroundColor), - onChanged: (pickedColor) { - colorBackground = - pickedColor.toHex(); + IconButton( + icon: const Icon( + IconsaxPlusLinear + .tick_square, + ), + onPressed: () { + if (colorBackground == + null) { + return; + } + weatherController + .updateWidgetBackgroundColor( + colorBackground!, + ); + MyApp.updateAppState( + context, + newWidgetBackgroundColor: + colorBackground, + ); + Get.back(); }, ), - ), + ], ), - IconButton( - icon: const Icon( - IconsaxPlusLinear.tick_square, - ), - onPressed: () { - if (colorBackground == null) { - return; - } - weatherController - .updateWidgetBackgroundColor( - colorBackground!); - MyApp.updateAppState(context, - newWidgetBackgroundColor: - colorBackground); - Get.back(); - }, - ), - ], + ), ), - ), - ), ); }, ), @@ -755,9 +837,10 @@ class _SettingsPageState extends State { backgroundColor: context.theme.indicatorColor, radius: 11, child: CircleAvatar( - backgroundColor: widgetTextColor.isEmpty - ? context.theme.primaryColor - : HexColor.fromHex(widgetTextColor), + backgroundColor: + widgetTextColor.isEmpty + ? context.theme.primaryColor + : HexColor.fromHex(widgetTextColor), radius: 10, ), ), @@ -765,71 +848,87 @@ class _SettingsPageState extends State { colorText = null; showDialog( context: context, - builder: (context) => Dialog( - child: SingleChildScrollView( - child: Column( - mainAxisSize: MainAxisSize.min, - crossAxisAlignment: - CrossAxisAlignment.center, - children: [ - Padding( - padding: - const EdgeInsets.symmetric( - vertical: 15), - child: Text( - 'widgetText'.tr, - style: context - .textTheme.titleMedium - ?.copyWith(fontSize: 18), - ), - ), - Padding( - padding: - const EdgeInsets.symmetric( - horizontal: 15), - child: Theme( - data: context.theme.copyWith( - inputDecorationTheme: - InputDecorationTheme( - border: OutlineInputBorder( - borderRadius: - BorderRadius.circular( - 8), + builder: + (context) => Dialog( + child: SingleChildScrollView( + child: Column( + mainAxisSize: MainAxisSize.min, + crossAxisAlignment: + CrossAxisAlignment.center, + children: [ + Padding( + padding: + const EdgeInsets.symmetric( + vertical: 15, + ), + child: Text( + 'widgetText'.tr, + style: context + .textTheme + .titleMedium + ?.copyWith( + fontSize: 18, + ), + ), + ), + Padding( + padding: + const EdgeInsets.symmetric( + horizontal: 15, + ), + child: Theme( + data: context.theme.copyWith( + inputDecorationTheme: + InputDecorationTheme( + border: OutlineInputBorder( + borderRadius: + BorderRadius.circular( + 8, + ), + ), + ), + ), + child: ColorPicker( + color: + widgetTextColor + .isEmpty + ? context + .theme + .primaryColor + : HexColor.fromHex( + widgetTextColor, + ), + onChanged: (pickedColor) { + colorText = + pickedColor.toHex(); + }, ), ), ), - child: ColorPicker( - color: widgetTextColor.isEmpty - ? context - .theme.primaryColor - : HexColor.fromHex( - widgetTextColor), - onChanged: (pickedColor) { - colorText = - pickedColor.toHex(); + IconButton( + icon: const Icon( + IconsaxPlusLinear + .tick_square, + ), + onPressed: () { + if (colorText == null) + return; + weatherController + .updateWidgetTextColor( + colorText!, + ); + MyApp.updateAppState( + context, + newWidgetTextColor: + colorText, + ); + Get.back(); }, ), - ), + ], ), - IconButton( - icon: const Icon( - IconsaxPlusLinear.tick_square, - ), - onPressed: () { - if (colorText == null) return; - weatherController - .updateWidgetTextColor( - colorText!); - MyApp.updateAppState(context, - newWidgetTextColor: - colorText); - Get.back(); - }, - ), - ], + ), ), - ), - ), ); }, ), @@ -853,7 +952,8 @@ class _SettingsPageState extends State { builder: (BuildContext context) { return Padding( padding: EdgeInsets.only( - bottom: MediaQuery.of(context).padding.bottom), + bottom: MediaQuery.of(context).padding.bottom, + ), child: StatefulBuilder( builder: (BuildContext context, setState) { return SingleChildScrollView( @@ -862,8 +962,9 @@ class _SettingsPageState extends State { mainAxisSize: MainAxisSize.min, children: [ Padding( - padding: - const EdgeInsets.symmetric(vertical: 15), + padding: const EdgeInsets.symmetric( + vertical: 15, + ), child: Text( 'map'.tr, style: context.textTheme.titleLarge?.copyWith( @@ -874,7 +975,8 @@ class _SettingsPageState extends State { SettingCard( elevation: 4, icon: const Icon( - IconsaxPlusLinear.location_slash), + IconsaxPlusLinear.location_slash, + ), text: 'hideMap'.tr, switcher: true, value: settings.hideMap, @@ -892,51 +994,63 @@ class _SettingsPageState extends State { ), SettingCard( elevation: 4, - icon: - const Icon(IconsaxPlusLinear.trash_square), - text: 'clearCacheStore'.tr, - onPressed: () => showAdaptiveDialog( - context: context, - builder: (context) => AlertDialog.adaptive( - title: Text( - 'deletedCacheStore'.tr, - style: context.textTheme.titleLarge, - ), - content: Text( - 'deletedCacheStoreQuery'.tr, - style: context.textTheme.titleMedium, - ), - actions: [ - TextButton( - onPressed: () => Get.back(), - child: Text( - 'cancel'.tr, - style: context.textTheme.titleMedium - ?.copyWith( - color: Colors.blueAccent, - ), - ), - ), - TextButton( - onPressed: () async { - final dir = - await getTemporaryDirectory(); - final cacheStoreFuture = FileCacheStore( - '${dir.path}${Platform.pathSeparator}MapTiles'); - cacheStoreFuture.clean(); - Get.back(); - }, - child: Text( - 'delete'.tr, - style: context.textTheme.titleMedium - ?.copyWith( - color: Colors.red, - ), - ), - ), - ], - ), + icon: const Icon( + IconsaxPlusLinear.trash_square, ), + text: 'clearCacheStore'.tr, + onPressed: + () => showAdaptiveDialog( + context: context, + builder: + (context) => AlertDialog.adaptive( + title: Text( + 'deletedCacheStore'.tr, + style: + context.textTheme.titleLarge, + ), + content: Text( + 'deletedCacheStoreQuery'.tr, + style: + context.textTheme.titleMedium, + ), + actions: [ + TextButton( + onPressed: () => Get.back(), + child: Text( + 'cancel'.tr, + style: context + .textTheme + .titleMedium + ?.copyWith( + color: + Colors.blueAccent, + ), + ), + ), + TextButton( + onPressed: () async { + final dir = + await getTemporaryDirectory(); + final cacheStoreFuture = + FileCacheStore( + '${dir.path}${Platform.pathSeparator}MapTiles', + ); + cacheStoreFuture.clean(); + Get.back(); + }, + child: Text( + 'delete'.tr, + style: context + .textTheme + .titleMedium + ?.copyWith( + color: Colors.red, + ), + ), + ), + ], + ), + ), ), const Gap(10), ], @@ -955,9 +1069,11 @@ class _SettingsPageState extends State { info: true, infoSettings: true, infoWidget: _TextInfo( - info: appLanguages.firstWhere( - (element) => (element['locale'] == locale), - orElse: () => appLanguages.first)['name'], + info: + appLanguages.firstWhere( + (element) => (element['locale'] == locale), + orElse: () => appLanguages.first, + )['name'], ), onPressed: () { showModalBottomSheet( @@ -965,7 +1081,8 @@ class _SettingsPageState extends State { builder: (BuildContext context) { return Padding( padding: EdgeInsets.only( - bottom: MediaQuery.of(context).padding.bottom), + bottom: MediaQuery.of(context).padding.bottom, + ), child: StatefulBuilder( builder: (BuildContext context, setState) { return ListView( @@ -988,7 +1105,9 @@ class _SettingsPageState extends State { return Card( elevation: 4, margin: const EdgeInsets.symmetric( - horizontal: 10, vertical: 5), + horizontal: 10, + vertical: 5, + ), child: ListTile( title: Text( appLanguages[index]['name'], @@ -996,11 +1115,14 @@ class _SettingsPageState extends State { textAlign: TextAlign.center, ), onTap: () { - MyApp.updateAppState(context, - newLocale: appLanguages[index] - ['locale']); + MyApp.updateAppState( + context, + newLocale: + appLanguages[index]['locale'], + ); updateLanguage( - appLanguages[index]['locale']); + appLanguages[index]['locale'], + ); }, ), ); @@ -1016,58 +1138,6 @@ class _SettingsPageState extends State { ); }, ), - SettingCard( - icon: const Icon(IconsaxPlusLinear.dollar_square), - text: 'support'.tr, - onPressed: () { - showModalBottomSheet( - context: context, - builder: (BuildContext context) { - return Padding( - padding: EdgeInsets.only( - bottom: MediaQuery.of(context).padding.bottom), - child: StatefulBuilder( - builder: (BuildContext context, setState) { - return SingleChildScrollView( - child: Column( - crossAxisAlignment: CrossAxisAlignment.center, - mainAxisSize: MainAxisSize.min, - children: [ - Padding( - padding: - const EdgeInsets.symmetric(vertical: 15), - child: Text( - 'support'.tr, - style: context.textTheme.titleLarge?.copyWith( - fontSize: 20, - ), - ), - ), - SettingCard( - elevation: 4, - icon: const Icon(IconsaxPlusLinear.card), - text: 'DonationAlerts', - onPressed: () => weatherController.urlLauncher( - 'https://www.donationalerts.com/r/darkmoonight'), - ), - SettingCard( - elevation: 4, - icon: const Icon(IconsaxPlusLinear.wallet), - text: 'ЮMoney', - onPressed: () => weatherController.urlLauncher( - 'https://yoomoney.ru/to/4100117672775961'), - ), - const Gap(10), - ], - ), - ); - }, - ), - ); - }, - ); - }, - ), SettingCard( icon: const Icon(IconsaxPlusLinear.link_square), text: 'groups'.tr, @@ -1077,7 +1147,8 @@ class _SettingsPageState extends State { builder: (BuildContext context) { return Padding( padding: EdgeInsets.only( - bottom: MediaQuery.of(context).padding.bottom), + bottom: MediaQuery.of(context).padding.bottom, + ), child: StatefulBuilder( builder: (BuildContext context, setState) { return SingleChildScrollView( @@ -1087,7 +1158,9 @@ class _SettingsPageState extends State { children: [ Padding( padding: const EdgeInsets.symmetric( - horizontal: 20, vertical: 15), + horizontal: 20, + vertical: 15, + ), child: Text( 'groups'.tr, style: context.textTheme.titleLarge?.copyWith( @@ -1099,15 +1172,19 @@ class _SettingsPageState extends State { elevation: 4, icon: const Icon(LineAwesomeIcons.discord), text: 'Discord', - onPressed: () => weatherController.urlLauncher( - 'https://discord.gg/JMMa9aHh8f'), + onPressed: + () => weatherController.urlLauncher( + 'https://discord.gg/JMMa9aHh8f', + ), ), SettingCard( elevation: 4, icon: const Icon(LineAwesomeIcons.telegram), text: 'Telegram', - onPressed: () => weatherController - .urlLauncher('https://t.me/darkmoonightX'), + onPressed: + () => weatherController.urlLauncher( + 'https://t.me/darkmoonightX', + ), ), const Gap(10), ], @@ -1123,38 +1200,39 @@ class _SettingsPageState extends State { SettingCard( icon: const Icon(IconsaxPlusLinear.document), text: 'license'.tr, - onPressed: () => Get.to( - () => LicensePage( - applicationIcon: Container( - width: 100, - height: 100, - margin: const EdgeInsets.symmetric(vertical: 5), - decoration: const BoxDecoration( - borderRadius: BorderRadius.all(Radius.circular(20)), - image: DecorationImage( - image: AssetImage('assets/icons/icon.png'), + onPressed: + () => Get.to( + () => LicensePage( + applicationIcon: Container( + width: 100, + height: 100, + margin: const EdgeInsets.symmetric(vertical: 5), + decoration: const BoxDecoration( + borderRadius: BorderRadius.all(Radius.circular(20)), + image: DecorationImage( + image: AssetImage('assets/icons/icon.png'), + ), + ), ), + applicationName: 'Rain', + applicationVersion: appVersion, ), + transition: Transition.downToUp, ), - applicationName: 'Rain', - applicationVersion: appVersion, - ), - transition: Transition.downToUp, - ), ), SettingCard( icon: const Icon(IconsaxPlusLinear.hierarchy_square_2), text: 'version'.tr, info: true, - infoWidget: _TextInfo( - info: '$appVersion', - ), + infoWidget: _TextInfo(info: '$appVersion'), ), SettingCard( icon: const Icon(LineAwesomeIcons.github), text: '${'project'.tr} GitHub', - onPressed: () => weatherController - .urlLauncher('https://github.com/darkmoonight/Rain'), + onPressed: + () => weatherController.urlLauncher( + 'https://github.com/darkmoonight/Rain', + ), ), Padding( padding: const EdgeInsets.all(10), @@ -1165,8 +1243,9 @@ class _SettingsPageState extends State { overflow: TextOverflow.visible, textAlign: TextAlign.center, ), - onTap: () => - weatherController.urlLauncher('https://open-meteo.com/'), + onTap: + () => + weatherController.urlLauncher('https://open-meteo.com/'), ), ), const Gap(10), diff --git a/lib/main.dart b/lib/main.dart index f305b02..eea5369 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -29,8 +29,9 @@ import 'package:workmanager/workmanager.dart'; late Isar isar; late Settings settings; late LocationCache locationCache; -final ValueNotifier> isOnline = - ValueNotifier(InternetConnection().hasInternetAccess); +final ValueNotifier> isOnline = ValueNotifier( + InternetConnection().hasInternetAccess, +); FlutterLocalNotificationsPlugin flutterLocalNotificationsPlugin = FlutterLocalNotificationsPlugin(); @@ -86,9 +87,9 @@ void callbackDispatcher() { void main() async { final String timeZoneName; WidgetsFlutterBinding.ensureInitialized(); - Connectivity() - .onConnectivityChanged - .listen((List result) { + Connectivity().onConnectivityChanged.listen(( + List result, + ) { result.contains(ConnectivityResult.none) ? isOnline.value = Future(() => false) : isOnline.value = InternetConnection().hasInternetAccess; @@ -120,12 +121,17 @@ void main() async { Future setOptimalDisplayMode() async { final List supported = await FlutterDisplayMode.supported; final DisplayMode active = await FlutterDisplayMode.active; - final List sameResolution = supported - .where((DisplayMode m) => - m.width == active.width && m.height == active.height) - .toList() - ..sort((DisplayMode a, DisplayMode b) => - b.refreshRate.compareTo(a.refreshRate)); + final List sameResolution = + supported + .where( + (DisplayMode m) => + m.width == active.width && m.height == active.height, + ) + .toList() + ..sort( + (DisplayMode a, DisplayMode b) => + b.refreshRate.compareTo(a.refreshRate), + ); final DisplayMode mostOptimalMode = sameResolution.isNotEmpty ? sameResolution.first : active; await FlutterDisplayMode.setPreferredMode(mostOptimalMode); @@ -277,7 +283,9 @@ class _MyAppState extends State { roundDegree = settings.roundDegree; largeElement = settings.largeElement; locale = Locale( - settings.language!.substring(0, 2), settings.language!.substring(3)); + settings.language!.substring(0, 2), + settings.language!.substring(3), + ); timeRange = settings.timeRange ?? 1; timeStart = settings.timeStart ?? '09:00'; timeEnd = settings.timeEnd ?? '21:00'; @@ -299,34 +307,65 @@ class _MyAppState extends State { child: DynamicColorBuilder( builder: (lightColorScheme, darkColorScheme) { final lightMaterialTheme = lightTheme( - lightColorScheme?.surface, lightColorScheme, edgeToEdgeAvailable); + lightColorScheme?.surface, + lightColorScheme, + edgeToEdgeAvailable, + ); final darkMaterialTheme = darkTheme( - darkColorScheme?.surface, darkColorScheme, edgeToEdgeAvailable); - final darkMaterialThemeOled = - darkTheme(oledColor, darkColorScheme, edgeToEdgeAvailable); + darkColorScheme?.surface, + darkColorScheme, + edgeToEdgeAvailable, + ); + final darkMaterialThemeOled = darkTheme( + oledColor, + darkColorScheme, + edgeToEdgeAvailable, + ); return GetMaterialApp( themeMode: themeController.theme, - theme: materialColor - ? lightColorScheme != null - ? lightMaterialTheme + theme: + materialColor + ? lightColorScheme != null + ? lightMaterialTheme + : lightTheme( + lightColor, + colorSchemeLight, + edgeToEdgeAvailable, + ) : lightTheme( - lightColor, colorSchemeLight, edgeToEdgeAvailable) - : lightTheme(lightColor, colorSchemeLight, edgeToEdgeAvailable), - darkTheme: amoledTheme - ? materialColor - ? darkColorScheme != null - ? darkMaterialThemeOled + lightColor, + colorSchemeLight, + edgeToEdgeAvailable, + ), + darkTheme: + amoledTheme + ? materialColor + ? darkColorScheme != null + ? darkMaterialThemeOled + : darkTheme( + oledColor, + colorSchemeDark, + edgeToEdgeAvailable, + ) : darkTheme( - oledColor, colorSchemeDark, edgeToEdgeAvailable) - : darkTheme(oledColor, colorSchemeDark, edgeToEdgeAvailable) - : materialColor + oledColor, + colorSchemeDark, + edgeToEdgeAvailable, + ) + : materialColor ? darkColorScheme != null ? darkMaterialTheme : darkTheme( - darkColor, colorSchemeDark, edgeToEdgeAvailable) + darkColor, + colorSchemeDark, + edgeToEdgeAvailable, + ) : darkTheme( - darkColor, colorSchemeDark, edgeToEdgeAvailable), + darkColor, + colorSchemeDark, + edgeToEdgeAvailable, + ), localizationsDelegates: const [ GlobalMaterialLocalizations.delegate, GlobalWidgetsLocalizations.delegate, @@ -338,14 +377,15 @@ class _MyAppState extends State { supportedLocales: appLanguages.map((e) => e['locale'] as Locale).toList(), debugShowCheckedModeBanner: false, - home: settings.onboard - ? (locationCache.city == null) || - (locationCache.district == null) || - (locationCache.lat == null) || - (locationCache.lon == null) - ? const SelectGeolocation(isStart: true) - : const HomePage() - : const OnBording(), + home: + settings.onboard + ? (locationCache.city == null) || + (locationCache.district == null) || + (locationCache.lat == null) || + (locationCache.lon == null) + ? const SelectGeolocation(isStart: true) + : const HomePage() + : const OnBording(), title: 'Rain', ); }, diff --git a/pubspec.lock b/pubspec.lock index 541a3d0..13767d2 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -34,10 +34,10 @@ packages: dependency: transitive description: name: archive - sha256: "6199c74e3db4fbfbd04f66d739e72fe11c8a8957d5f219f1f4482dbde6420b5a" + sha256: "0c64e928dcbefddecd234205422bcfc2b5e6d31be0b86fef0d0dd48d7b4c9742" url: "https://pub.dev" source: hosted - version: "4.0.2" + version: "4.0.4" args: dependency: transitive description: @@ -50,18 +50,18 @@ packages: dependency: transitive description: name: async - sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" + sha256: d2872f9c19731c2e5f10444b14686eb7cc85c76274bd6c16e1816bff9a3bab63 url: "https://pub.dev" source: hosted - version: "2.11.0" + version: "2.12.0" boolean_selector: dependency: transitive description: name: boolean_selector - sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" + sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea" url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.1.2" build: dependency: transitive description: @@ -82,26 +82,26 @@ packages: dependency: transitive description: name: build_daemon - sha256: "294a2edaf4814a378725bfe6358210196f5ea37af89ecd81bfa32960113d4948" + sha256: "8e928697a82be082206edb0b9c99c5a4ad6bc31c9e9b8b2f291ae65cd4a25daa" url: "https://pub.dev" source: hosted - version: "4.0.3" + version: "4.0.4" build_resolvers: dependency: transitive description: name: build_resolvers - sha256: "99d3980049739a985cf9b21f30881f46db3ebc62c5b8d5e60e27440876b1ba1e" + sha256: b9e4fda21d846e192628e7a4f6deda6888c36b5b69ba02ff291a01fd529140f0 url: "https://pub.dev" source: hosted - version: "2.4.3" + version: "2.4.4" build_runner: dependency: "direct dev" description: name: build_runner - sha256: "74691599a5bc750dc96a6b4bfd48f7d9d66453eab04c7f4063134800d6a5c573" + sha256: "058fe9dce1de7d69c4b84fada934df3e0153dd000758c4d65964d0166779aa99" url: "https://pub.dev" source: hosted - version: "2.4.14" + version: "2.4.15" build_runner_core: dependency: transitive description: @@ -122,18 +122,18 @@ packages: dependency: transitive description: name: built_value - sha256: "28a712df2576b63c6c005c465989a348604960c0958d28be5303ba9baa841ac2" + sha256: "8b158ab94ec6913e480dc3f752418348b5ae099eb75868b5f4775f0572999c61" url: "https://pub.dev" source: hosted - version: "8.9.3" + version: "8.9.4" characters: dependency: transitive description: name: characters - sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" + sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803 url: "https://pub.dev" source: hosted - version: "1.3.0" + version: "1.4.0" checked_yaml: dependency: transitive description: @@ -154,10 +154,10 @@ packages: dependency: transitive description: name: clock - sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf + sha256: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b url: "https://pub.dev" source: hosted - version: "1.1.1" + version: "1.1.2" code_builder: dependency: transitive description: @@ -170,10 +170,10 @@ packages: dependency: transitive description: name: collection - sha256: a1ace0a119f20aabc852d165077c036cd864315bd99b7eaa10a60100341941bf + sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76" url: "https://pub.dev" source: hosted - version: "1.19.0" + version: "1.19.1" connectivity_plus: dependency: "direct main" description: @@ -250,10 +250,10 @@ packages: dependency: "direct main" description: name: device_info_plus - sha256: "72d146c6d7098689ff5c5f66bcf593ac11efc530095385356e131070333e64da" + sha256: "610739247975c2d0de43482afa13ec1018f63c9fddf97ef3d8dc895faa3b4543" url: "https://pub.dev" source: hosted - version: "11.3.0" + version: "11.3.2" device_info_plus_platform_interface: dependency: transitive description: @@ -290,10 +290,10 @@ packages: dependency: transitive description: name: dio_web_adapter - sha256: e485c7a39ff2b384fa1d7e09b4e25f755804de8384358049124830b04fc4f93a + sha256: "7586e476d70caecaf1686d21eee7247ea43ef5c345eab9e0cc3583ff13378d78" url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.1" dynamic_color: dependency: "direct main" description: @@ -306,18 +306,18 @@ packages: dependency: transitive description: name: fake_async - sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" + sha256: "6a95e56b2449df2273fd8c45a662d6947ce1ebb7aafe80e550a3f68297f3cacc" url: "https://pub.dev" source: hosted - version: "1.3.1" + version: "1.3.2" ffi: dependency: transitive description: name: ffi - sha256: "16ed7b077ef01ad6170a3d0c57caa4a112a38d7a2ed5602e0aca9ca6f3d98da6" + sha256: "289279317b4b16eb2bb7e271abccd4bf84ec9bdcbe999e278a94b804f5630418" url: "https://pub.dev" source: hosted - version: "2.1.3" + version: "2.1.4" file: dependency: transitive description: @@ -412,10 +412,10 @@ packages: dependency: "direct main" description: name: flutter_map - sha256: "82786b8e1ffbff079487eeeed59a34e8a0b09896dd7713d8e1dc193d673496b5" + sha256: bbf145e8220531f2f727608c431871c7457f3b134e513543913afd00fdc1cd47 url: "https://pub.dev" source: hosted - version: "8.0.0" + version: "8.1.0" flutter_map_animations: dependency: "direct main" description: @@ -436,10 +436,10 @@ packages: dependency: "direct dev" description: name: flutter_native_splash - sha256: "7062602e0dbd29141fb8eb19220b5871ca650be5197ab9c1f193a28b17537bc7" + sha256: edb09c35ee9230c4b03f13dd45bb3a276d0801865f0a4650b7e2a3bba61a803a url: "https://pub.dev" source: hosted - version: "2.4.4" + version: "2.4.5" flutter_test: dependency: "direct dev" description: flutter @@ -462,18 +462,18 @@ packages: dependency: "direct dev" description: name: freezed - sha256: "44c19278dd9d89292cf46e97dc0c1e52ce03275f40a97c5a348e802a924bf40e" + sha256: "62b248b2dfb06ded10c84b713215b25aea020a5b08c32e801a974361557ebc3f" url: "https://pub.dev" source: hosted - version: "2.5.7" + version: "3.0.0-0.0.dev" freezed_annotation: dependency: "direct main" description: name: freezed_annotation - sha256: c2e2d632dd9b8a2b7751117abcfc2b4888ecfe181bd9fca7170d9ef02e595fe2 + sha256: c87ff004c8aa6af2d531668b46a4ea379f7191dc6dfa066acd53d506da6e044b url: "https://pub.dev" source: hosted - version: "2.4.4" + version: "3.0.0" frontend_server_client: dependency: transitive description: @@ -542,10 +542,10 @@ packages: dependency: transitive description: name: geolocator_apple - sha256: "6154ea2682563f69fc0125762ed7e91e7ed85d0b9776595653be33918e064807" + sha256: c4ecead17985ede9634f21500072edfcb3dba0ef7b97f8d7bc556d2d722b3ba3 url: "https://pub.dev" source: hosted - version: "2.3.8+1" + version: "2.3.9" geolocator_platform_interface: dependency: transitive description: @@ -574,10 +574,10 @@ packages: dependency: "direct main" description: name: get - sha256: e4e7335ede17452b391ed3b2ede016545706c01a02292a6c97619705e7d2a85e + sha256: c79eeb4339f1f3deffd9ec912f8a923834bec55f7b49c9e882b8fef2c139d425 url: "https://pub.dev" source: hosted - version: "4.6.6" + version: "4.7.2" glob: dependency: transitive description: @@ -654,10 +654,10 @@ packages: dependency: transitive description: name: image - sha256: "8346ad4b5173924b5ddddab782fc7d8a6300178c8b1dc427775405a01701c4a6" + sha256: "13d3349ace88f12f4a0d175eb5c12dcdd39d35c4c109a8a13dfeb6d0bd9e31c3" url: "https://pub.dev" source: hosted - version: "4.5.2" + version: "4.5.3" internet_connection_checker_plus: dependency: "direct main" description: @@ -710,10 +710,10 @@ packages: dependency: transitive description: name: js - sha256: c1b2e9b5ea78c45e1a0788d29606ba27dc5f71f019f32ca5140f61ef071838cf + sha256: "53385261521cc4a0c4658fd0ad07a7d14591cf8fc33abbceae306ddb974888dc" url: "https://pub.dev" source: hosted - version: "0.7.1" + version: "0.7.2" json_annotation: dependency: "direct main" description: @@ -750,18 +750,18 @@ packages: dependency: transitive description: name: leak_tracker - sha256: "7bb2830ebd849694d1ec25bf1f44582d6ac531a57a365a803a6034ff751d2d06" + sha256: c35baad643ba394b40aac41080300150a4f08fd0fd6a10378f8f7c6bc161acec url: "https://pub.dev" source: hosted - version: "10.0.7" + version: "10.0.8" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: "9491a714cca3667b60b5c420da8217e6de0d1ba7a5ec322fab01758f6998f379" + sha256: f8b613e7e6a13ec79cfdc0e97638fddb3ab848452eff057653abd3edba760573 url: "https://pub.dev" source: hosted - version: "3.0.8" + version: "3.0.9" leak_tracker_testing: dependency: transitive description: @@ -822,10 +822,10 @@ packages: dependency: transitive description: name: matcher - sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb + sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2 url: "https://pub.dev" source: hosted - version: "0.12.16+1" + version: "0.12.17" material_color_utilities: dependency: transitive description: @@ -838,10 +838,10 @@ packages: dependency: transitive description: name: meta - sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 + sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c url: "https://pub.dev" source: hosted - version: "1.15.0" + version: "1.16.0" mgrs_dart: dependency: transitive description: @@ -878,26 +878,26 @@ packages: dependency: "direct main" description: name: package_info_plus - sha256: "67eae327b1b0faf761964a1d2e5d323c797f3799db0e85aa232db8d9e922bc35" + sha256: "7976bfe4c583170d6cdc7077e3237560b364149fcd268b5f53d95a991963b191" url: "https://pub.dev" source: hosted - version: "8.2.1" + version: "8.3.0" package_info_plus_platform_interface: dependency: transitive description: name: package_info_plus_platform_interface - sha256: "205ec83335c2ab9107bbba3f8997f9356d72ca3c715d2f038fc773d0366b4c76" + sha256: "6c935fb612dff8e3cc9632c2b301720c77450a126114126ffaafe28d2e87956c" url: "https://pub.dev" source: hosted - version: "3.1.0" + version: "3.2.0" path: dependency: transitive description: name: path - sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" + sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5" url: "https://pub.dev" source: hosted - version: "1.9.0" + version: "1.9.1" path_provider: dependency: "direct main" description: @@ -950,10 +950,10 @@ packages: dependency: transitive description: name: petitparser - sha256: c15605cd28af66339f8eb6fbe0e541bfe2d1b72d5825efc6598f3e0a31b9ad27 + sha256: "07c8f0b1913bcde1ff0d26e57ace2f3012ccbf2b204e070290dad3bb22797646" url: "https://pub.dev" source: hosted - version: "6.0.2" + version: "6.1.0" platform: dependency: transitive description: @@ -1046,10 +1046,10 @@ packages: dependency: transitive description: name: shelf_web_socket - sha256: cc36c297b52866d203dbf9332263c94becc2fe0ceaa9681d07b6ef9807023b67 + sha256: "3632775c8e90d6c9712f883e633716432a27758216dfb61bd86a8321c0580925" url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "3.0.0" shimmer: dependency: "direct main" description: @@ -1083,10 +1083,10 @@ packages: dependency: transitive description: name: source_span - sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" + sha256: "254ee5351d6cb365c859e20ee823c3bb479bf4a293c22d17a9f1bf144ce86f7c" url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.10.1" sprintf: dependency: transitive description: @@ -1099,18 +1099,18 @@ packages: dependency: transitive description: name: stack_trace - sha256: "9f47fd3630d76be3ab26f0ee06d213679aa425996925ff3feffdec504931c377" + sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1" url: "https://pub.dev" source: hosted - version: "1.12.0" + version: "1.12.1" stream_channel: dependency: transitive description: name: stream_channel - sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 + sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d" url: "https://pub.dev" source: hosted - version: "2.1.2" + version: "2.1.4" stream_transform: dependency: transitive description: @@ -1123,34 +1123,34 @@ packages: dependency: transitive description: name: string_scanner - sha256: "688af5ed3402a4bde5b3a6c15fd768dbf2621a614950b17f04626c431ab3c4c3" + sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43" url: "https://pub.dev" source: hosted - version: "1.3.0" + version: "1.4.1" synchronized: dependency: transitive description: name: synchronized - sha256: "69fe30f3a8b04a0be0c15ae6490fc859a78ef4c43ae2dd5e8a623d45bfcf9225" + sha256: "0669c70faae6270521ee4f05bffd2919892d42d1276e6c495be80174b6bc0ef6" url: "https://pub.dev" source: hosted - version: "3.3.0+3" + version: "3.3.1" term_glyph: dependency: transitive description: name: term_glyph - sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e" url: "https://pub.dev" source: hosted - version: "1.2.1" + version: "1.2.2" test_api: dependency: transitive description: name: test_api - sha256: "664d3a9a64782fcdeb83ce9c6b39e78fd2971d4e37827b9b06c3aa1edc5e760c" + sha256: fb31f383e2ee25fbbfe06b40fe21e1e458d14080e3c67e7ba0acfde4df4e0bbd url: "https://pub.dev" source: hosted - version: "0.7.3" + version: "0.7.4" time: dependency: transitive description: @@ -1283,10 +1283,10 @@ packages: dependency: transitive description: name: vm_service - sha256: f6be3ed8bd01289b34d679c2b62226f63c0e69f9fd2e50a6b3c1c729a961041b + sha256: "0968250880a6c5fe7edc067ed0a13d4bae1577fe2771dcf3010d52c4a9d3ca14" url: "https://pub.dev" source: hosted - version: "14.3.0" + version: "14.3.1" watcher: dependency: transitive description: @@ -1299,10 +1299,10 @@ packages: dependency: transitive description: name: web - sha256: cd3543bd5798f6ad290ea73d210f423502e71900302dde696f8bff84bf89a1cb + sha256: "868d88a33d8a87b18ffc05f9f030ba328ffefba92d6c127917a2ba740f9cfe4a" url: "https://pub.dev" source: hosted - version: "1.1.0" + version: "1.1.1" web_socket: dependency: transitive description: @@ -1323,18 +1323,18 @@ packages: dependency: transitive description: name: win32 - sha256: daf97c9d80197ed7b619040e86c8ab9a9dad285e7671ee7390f9180cc828a51e + sha256: b89e6e24d1454e149ab20fbb225af58660f0c0bf4475544650700d8e2da54aef url: "https://pub.dev" source: hosted - version: "5.10.1" + version: "5.11.0" win32_registry: dependency: transitive description: name: win32_registry - sha256: "21ec76dfc731550fd3e2ce7a33a9ea90b828fdf19a5c3bcf556fa992cfa99852" + sha256: "6f1b564492d0147b330dd794fee8f512cec4977957f310f9951b5f9d83618dae" url: "https://pub.dev" source: hosted - version: "1.1.5" + version: "2.1.0" wkt_parser: dependency: transitive description: @@ -1346,10 +1346,11 @@ packages: workmanager: dependency: "direct main" description: - name: workmanager - sha256: ed13530cccd28c5c9959ad42d657cd0666274ca74c56dea0ca183ddd527d3a00 - url: "https://pub.dev" - source: hosted + path: workmanager + ref: main + resolved-ref: "4ce065135dc1b91fee918f81596b42a56850391d" + url: "https://github.com/fluttercommunity/flutter_workmanager.git" + source: git version: "0.5.2" xdg_directories: dependency: transitive @@ -1384,5 +1385,5 @@ packages: source: hosted version: "3.1.3" sdks: - dart: ">=3.6.2 <4.0.0" + dart: ">=3.7.0 <4.0.0" flutter: ">=3.27.0" diff --git a/pubspec.yaml b/pubspec.yaml index 3ae9398..3a05cc3 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -6,14 +6,14 @@ publish_to: "none" version: 1.3.7+40 environment: - sdk: ">=3.6.2 <4.0.0" + sdk: ">=3.7.0 <4.0.0" dependencies: flutter: sdk: flutter flutter_localizations: sdk: flutter - get: ^4.6.6 + get: ^4.7.2 gap: ^3.0.1 dio: ^5.8.0+1 intl: ^0.19.0 @@ -23,9 +23,8 @@ dependencies: geocoding: ^3.0.0 geolocator: ^13.0.2 home_widget: ^0.7.0+1 - workmanager: ^0.5.2 restart_app: ^1.3.2 - flutter_map: ^8.0.0 + flutter_map: ^8.1.0 google_fonts: ^6.2.1 url_launcher: ^6.3.1 iconsax_plus: ^1.0.0 @@ -34,11 +33,11 @@ dependencies: # quick_settings: ^1.0.1 json_annotation: ^4.9.0 flutter_timezone: ^4.1.0 - device_info_plus: ^11.3.0 - package_info_plus: ^8.2.1 + device_info_plus: ^11.3.2 + package_info_plus: ^8.3.0 connectivity_plus: ^6.1.3 flutter_map_cache: ^1.5.2 - freezed_annotation: ^2.4.4 + freezed_annotation: ^3.0.0 flutter_displaymode: ^0.6.0 lat_lng_to_timezone: ^0.2.0 line_awesome_flutter: ^3.0.1 @@ -56,6 +55,11 @@ dependencies: isar_flutter_libs: version: ^3.1.8 hosted: https://pub.isar-community.dev/ + workmanager: + git: + url: https://github.com/fluttercommunity/flutter_workmanager.git + path: workmanager + ref: main # Uncomment this for publishing FLOSS variant # dependency_overrides: @@ -68,11 +72,11 @@ dependencies: dev_dependencies: flutter_test: sdk: flutter - freezed: ^2.5.7 - build_runner: ^2.4.14 + freezed: ^3.0.0-0.0.dev + build_runner: ^2.4.15 flutter_lints: ^5.0.0 json_serializable: ^6.9.0 - flutter_native_splash: ^2.4.4 + flutter_native_splash: ^2.4.5 flutter_launcher_icons: ^0.14.3 isar_generator: version: ^3.1.8