diff --git a/cli/lib/commands/rm/command.dart b/cli/lib/commands/rm/command.dart index 4e22de7..0d78c48 100644 --- a/cli/lib/commands/rm/command.dart +++ b/cli/lib/commands/rm/command.dart @@ -8,6 +8,7 @@ Future run(List args) async { } final elementPath = args.first; final elementType = FileSystemEntity.typeSync(elementPath); + // ignore: exhaustive_cases switch (elementType) { case FileSystemEntityType.directory: final dir = Directory(elementPath); diff --git a/cli/pubspec.yaml b/cli/pubspec.yaml index e63d77a..7054a65 100644 --- a/cli/pubspec.yaml +++ b/cli/pubspec.yaml @@ -5,8 +5,8 @@ version: 0.1.0+1 environment: sdk: ">=2.17.0 <3.0.0" -dependencies: - path: ^1.8.0 +dependencies: + path: ^1.8.2 dev_dependencies: test: ^1.17.12 diff --git a/examples/form_flow/lib/bootstrap.dart b/examples/form_flow/lib/bootstrap.dart index c612b58..5693732 100644 --- a/examples/form_flow/lib/bootstrap.dart +++ b/examples/form_flow/lib/bootstrap.dart @@ -26,17 +26,10 @@ class AppBlocObserver extends BlocObserver { } Future bootstrap(FutureOr Function() builder) async { + Bloc.observer = AppBlocObserver(); FlutterError.onError = (details) { log(details.exceptionAsString(), stackTrace: details.stack); }; - await runZonedGuarded( - () async { - await BlocOverrides.runZoned( - () async => runApp(await builder()), - blocObserver: AppBlocObserver(), - ); - }, - (error, stackTrace) => log(error.toString(), stackTrace: stackTrace), - ); + runApp(await builder()); } diff --git a/examples/form_flow/pubspec.lock b/examples/form_flow/pubspec.lock index 26cb077..bbcd40f 100644 --- a/examples/form_flow/pubspec.lock +++ b/examples/form_flow/pubspec.lock @@ -35,14 +35,14 @@ packages: name: bloc url: "https://pub.dartlang.org" source: hosted - version: "8.0.3" + version: "8.1.0" bloc_test: dependency: "direct dev" description: name: bloc_test url: "https://pub.dartlang.org" source: hosted - version: "9.0.3" + version: "9.1.0" boolean_selector: dependency: transitive description: @@ -145,7 +145,7 @@ packages: name: flutter_bloc url: "https://pub.dartlang.org" source: hosted - version: "8.0.1" + version: "8.1.1" flutter_localizations: dependency: "direct main" description: flutter diff --git a/examples/form_flow/pubspec.yaml b/examples/form_flow/pubspec.yaml index de0a460..be881f4 100644 --- a/examples/form_flow/pubspec.yaml +++ b/examples/form_flow/pubspec.yaml @@ -8,12 +8,12 @@ environment: flutter: "3.0.0" dependencies: - bloc: ^8.0.3 + bloc: ^8.1.0 equatable: ^2.0.3 flow_builder: ^0.0.8 flutter: sdk: flutter - flutter_bloc: ^8.0.1 + flutter_bloc: ^8.1.1 flutter_localizations: sdk: flutter formz_inputs: @@ -23,7 +23,7 @@ dependencies: path: packages/profile dev_dependencies: - bloc_test: ^9.0.3 + bloc_test: ^9.1.0 flutter_test: sdk: flutter mocktail: ^0.3.0 diff --git a/examples/launch_analytics/pubspec.yaml b/examples/launch_analytics/pubspec.yaml index 22ecde0..e5be6e6 100644 --- a/examples/launch_analytics/pubspec.yaml +++ b/examples/launch_analytics/pubspec.yaml @@ -12,12 +12,12 @@ environment: dependencies: analytics_repository: path: packages/analytics_repository - bloc: ^8.0.3 + bloc: ^8.1.0 cupertino_icons: ^1.0.2 equatable: ^2.0.3 flutter: sdk: flutter - flutter_bloc: ^8.0.1 + flutter_bloc: ^8.1.1 # https://github.com/flutter/flutter/issues/94123 flutter_services_binding: ^0.1.0 hive_flutter: ^1.1.0 @@ -27,7 +27,7 @@ dependencies: path_provider: ^2.0.2 dev_dependencies: - bloc_test: ^9.0.3 + bloc_test: ^9.1.0 flutter_test: sdk: flutter mocktail: ^0.3.0 diff --git a/examples/preference_navigation/lib/main.dart b/examples/preference_navigation/lib/main.dart index 7885d72..27f7dfd 100644 --- a/examples/preference_navigation/lib/main.dart +++ b/examples/preference_navigation/lib/main.dart @@ -3,27 +3,25 @@ import 'dart:developer'; import 'package:bloc/bloc.dart'; import 'package:flutter/widgets.dart'; -import 'package:flutter_services_binding/flutter_services_binding.dart'; import 'package:preference_navigation/app/app.dart'; import 'package:preference_navigation/app/app_bloc_observer.dart'; import 'package:shared_preferences/shared_preferences.dart'; import 'package:shared_preferences_repository/shared_preferences_repository.dart'; Future main() async { - await runZonedGuarded>( - () async { - FlutterServicesBinding.ensureInitialized(); - final preferences = await SharedPreferences.getInstance(); - final preferencesRepository = SharedPreferencesRepository( - sharedPreferences: preferences, - ); - BlocOverrides.runZoned( - () => runApp( - App(preferencesRepository: preferencesRepository), - ), - blocObserver: AppBlocObserver(), - ); - }, - (error, stackTrace) => log(error.toString(), stackTrace: stackTrace), + Bloc.observer = AppBlocObserver(); + FlutterError.onError = (details) { + log(details.exceptionAsString(), stackTrace: details.stack); + }; + + final preferences = await SharedPreferences.getInstance(); + final preferencesRepository = SharedPreferencesRepository( + sharedPreferences: preferences, + ); + + runApp( + App( + preferencesRepository: preferencesRepository, + ), ); } diff --git a/examples/preference_navigation/pubspec.yaml b/examples/preference_navigation/pubspec.yaml index 1cb175a..db53d47 100644 --- a/examples/preference_navigation/pubspec.yaml +++ b/examples/preference_navigation/pubspec.yaml @@ -8,14 +8,12 @@ environment: flutter: "3.0.0" dependencies: - bloc: ^8.0.3 + bloc: ^8.1.0 cupertino_icons: ^1.0.2 equatable: ^2.0.3 flutter: sdk: flutter - flutter_bloc: ^8.0.1 - # https://github.com/flutter/flutter/issues/94123 - flutter_services_binding: ^0.1.0 + flutter_bloc: ^8.1.1 hive: ^2.0.4 hive_preferences_repository: path: packages/preferences_repository/hive_preferences_repository @@ -25,7 +23,7 @@ dependencies: path: packages/preferences_repository/shared_preferences_repository dev_dependencies: - bloc_test: ^9.0.3 + bloc_test: ^9.1.0 flutter_test: sdk: flutter mockingjay: ^0.3.0 diff --git a/examples/profile_accounts/pubspec.yaml b/examples/profile_accounts/pubspec.yaml index b4108f8..139a420 100644 --- a/examples/profile_accounts/pubspec.yaml +++ b/examples/profile_accounts/pubspec.yaml @@ -8,17 +8,17 @@ environment: flutter: "3.0.0" dependencies: - bloc: ^8.0.3 + bloc: ^8.1.0 cupertino_icons: ^1.0.2 equatable: ^2.0.3 flutter: sdk: flutter - flutter_bloc: ^8.0.1 + flutter_bloc: ^8.1.1 profile_core: path: packages/profile_core dev_dependencies: - bloc_test: ^9.0.3 + bloc_test: ^9.1.0 flutter_test: sdk: flutter mocktail: ^0.3.0