diff --git a/lib/main.dart b/lib/main.dart index 52faed4c45f7f5e2b62854cbbbcafeb1f155186c..5a3e50eb8741600592a6e9f5c29a8abafb5871c6 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -21,21 +21,24 @@ void main() async { } final tmpDir = await getTemporaryDirectory(); Hive.init(tmpDir.toString()); - HydratedBloc.storage = await HydratedStorage.build( + final storage = await HydratedStorage.build( storageDirectory: tmpDir, ); - runApp( - EasyLocalization( - path: 'assets/translations', - supportedLocales: const [ - Locale('en'), - Locale('de'), - ], - fallbackLocale: const Locale('en'), - useFallbackTranslations: true, - child: const MyApp(), + HydratedBlocOverrides.runZoned( + () => runApp( + EasyLocalization( + path: 'assets/translations', + supportedLocales: const [ + Locale('en'), + Locale('de'), + ], + fallbackLocale: const Locale('en'), + useFallbackTranslations: true, + child: const MyApp(), + ), ), + storage: storage, ); } diff --git a/lib/ui/screens/skeleton_screen.dart b/lib/ui/screens/skeleton_screen.dart index bb8ae4b4fa308488becd24fb134f2e6a54e79b0e..805456d7451240b9fec23730b5fae93b00ae083a 100644 --- a/lib/ui/screens/skeleton_screen.dart +++ b/lib/ui/screens/skeleton_screen.dart @@ -18,22 +18,22 @@ class SkeletonScreen extends StatelessWidget { @override Widget build(BuildContext context) { return BlocProvider<BottomNavCubit>( - create: (context) => BottomNavCubit(), - child: BlocBuilder<BottomNavCubit, int>( - builder: (BuildContext context, int state) { - return Scaffold( - appBar: const AppBarGone(), + create: (context) => BottomNavCubit(), + child: Scaffold( + appBar: const AppBarGone(), - /// When switching between tabs this will fade the old - /// layout out and the new layout in. - body: AnimatedSwitcher( - duration: const Duration(milliseconds: 300), - child: _pageNavigation.elementAt(state)), - /// Cannot be const, tab status will not update. - bottomNavigationBar: BottomNavBar(), - ); - }, - ), - ); + /// When switching between tabs this will fade the old + /// layout out and the new layout in. + body: BlocBuilder<BottomNavCubit, int>( + builder: (context, state) { + return AnimatedSwitcher( + duration: const Duration(milliseconds: 300), + child: _pageNavigation.elementAt(state)); + }, + ), + + /// Cannot be const, tab status will not update. + bottomNavigationBar: BottomNavBar(), + )); } } diff --git a/pubspec.lock b/pubspec.lock index a2b43af9274677ef0028d3e32ae0366eeadd9d76..08be2939fb1ec4bc639731911c99e549cacd5b2c 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -7,21 +7,21 @@ packages: name: args url: "https://pub.dartlang.org" source: hosted - version: "2.1.1" + version: "2.3.0" async: dependency: transitive description: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.6.1" + version: "2.8.2" bloc: dependency: "direct main" description: name: bloc url: "https://pub.dartlang.org" source: hosted - version: "7.0.0" + version: "8.0.2" boolean_selector: dependency: transitive description: @@ -35,14 +35,14 @@ packages: name: characters url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.2.0" charcode: dependency: transitive description: name: charcode url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.3.1" clock: dependency: transitive description: @@ -117,7 +117,7 @@ packages: name: flutter_bloc url: "https://pub.dartlang.org" source: hosted - version: "7.0.1" + version: "8.0.1" flutter_displaymode: dependency: "direct main" description: @@ -131,7 +131,7 @@ packages: name: flutter_lints url: "https://pub.dartlang.org" source: hosted - version: "1.0.3" + version: "1.0.4" flutter_localizations: dependency: transitive description: flutter @@ -153,14 +153,14 @@ packages: name: hive url: "https://pub.dartlang.org" source: hosted - version: "2.0.4" + version: "2.0.5" hydrated_bloc: dependency: "direct main" description: name: hydrated_bloc url: "https://pub.dartlang.org" source: hosted - version: "7.0.1" + version: "8.0.0" intl: dependency: transitive description: @@ -195,14 +195,14 @@ packages: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.10" + version: "0.12.11" meta: dependency: transitive description: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.3.0" + version: "1.7.0" nested: dependency: transitive description: @@ -223,84 +223,112 @@ packages: name: path_provider url: "https://pub.dartlang.org" source: hosted - version: "2.0.2" + version: "2.0.8" + path_provider_android: + dependency: transitive + description: + name: path_provider_android + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.11" + path_provider_ios: + dependency: transitive + description: + name: path_provider_ios + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.7" path_provider_linux: dependency: transitive description: name: path_provider_linux url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.1.4" path_provider_macos: dependency: transitive description: name: path_provider_macos url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.0.4" path_provider_platform_interface: dependency: transitive description: name: path_provider_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "2.0.1" + version: "2.0.2" path_provider_windows: dependency: transitive description: name: path_provider_windows url: "https://pub.dartlang.org" source: hosted - version: "2.0.1" + version: "2.0.4" platform: dependency: transitive description: name: platform url: "https://pub.dartlang.org" source: hosted - version: "3.0.0" + version: "3.1.0" plugin_platform_interface: dependency: transitive description: name: plugin_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.1.2" process: dependency: transitive description: name: process url: "https://pub.dartlang.org" source: hosted - version: "4.2.1" + version: "4.2.4" provider: dependency: transitive description: name: provider url: "https://pub.dartlang.org" source: hosted - version: "5.0.0" + version: "6.0.2" shared_preferences: dependency: transitive description: name: shared_preferences url: "https://pub.dartlang.org" source: hosted - version: "2.0.6" + version: "2.0.11" + shared_preferences_android: + dependency: transitive + description: + name: shared_preferences_android + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.9" + shared_preferences_ios: + dependency: transitive + description: + name: shared_preferences_ios + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.8" shared_preferences_linux: dependency: transitive description: name: shared_preferences_linux url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.0.3" shared_preferences_macos: dependency: transitive description: name: shared_preferences_macos url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.0.2" shared_preferences_platform_interface: dependency: transitive description: @@ -314,14 +342,14 @@ packages: name: shared_preferences_web url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.0.2" shared_preferences_windows: dependency: transitive description: name: shared_preferences_windows url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.0.3" sky_engine: dependency: transitive description: flutter @@ -375,7 +403,7 @@ packages: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.3.0" + version: "0.4.3" typed_data: dependency: transitive description: @@ -389,56 +417,70 @@ packages: name: url_launcher url: "https://pub.dartlang.org" source: hosted - version: "6.0.6" + version: "6.0.17" + url_launcher_android: + dependency: transitive + description: + name: url_launcher_android + url: "https://pub.dartlang.org" + source: hosted + version: "6.0.13" + url_launcher_ios: + dependency: transitive + description: + name: url_launcher_ios + url: "https://pub.dartlang.org" + source: hosted + version: "6.0.13" url_launcher_linux: dependency: transitive description: name: url_launcher_linux url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.0.2" url_launcher_macos: dependency: transitive description: name: url_launcher_macos url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.0.2" url_launcher_platform_interface: dependency: transitive description: name: url_launcher_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "2.0.3" + version: "2.0.5" url_launcher_web: dependency: transitive description: name: url_launcher_web url: "https://pub.dartlang.org" source: hosted - version: "2.0.1" + version: "2.0.5" url_launcher_windows: dependency: transitive description: name: url_launcher_windows url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.0.2" vector_math: dependency: transitive description: name: vector_math url: "https://pub.dartlang.org" source: hosted - version: "2.1.0" + version: "2.1.1" win32: dependency: transitive description: name: win32 url: "https://pub.dartlang.org" source: hosted - version: "2.2.0" + version: "2.3.3" xdg_directories: dependency: transitive description: @@ -447,5 +489,5 @@ packages: source: hosted version: "0.2.0" sdks: - dart: ">=2.13.0 <3.0.0" - flutter: ">=2.0.0" + dart: ">=2.14.0 <3.0.0" + flutter: ">=2.5.0" diff --git a/pubspec.yaml b/pubspec.yaml index 7020d5c97c7cec7553e4170dc78ef166d2d3c636..6dbc3a673a8a52bbde1eddb66160a1c770e584df 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -24,21 +24,21 @@ dependencies: flutter: sdk: flutter - bloc: ^7.0.0 - flutter_bloc: ^7.0.1 - hydrated_bloc: ^7.0.1 - equatable: ^2.0.2 - path_provider: ^2.0.2 + bloc: ^8.0.2 + flutter_bloc: ^8.0.1 + hydrated_bloc: ^8.0.0 + equatable: ^2.0.3 + path_provider: ^2.0.8 flutter_displaymode: ^0.3.2 easy_localization: ^3.0.0 - hive: ^2.0.4 - url_launcher: ^6.0.6 + hive: ^2.0.5 + url_launcher: ^6.0.17 ionicons: ^0.1.2 dev_dependencies: flutter_test: sdk: flutter - flutter_lints: ^1.0.3 + flutter_lints: ^1.0.4 # For information on the generic Dart part of this file, see the # following page: https://dart.dev/tools/pub/pubspec