Skip to content

Commit

Permalink
deps: upgrade to bloc 8.1.0 (#37)
Browse files Browse the repository at this point in the history
* deps: upgrade to bloc 8.1.0

* fix: ignore exhaustive cases
  • Loading branch information
marcossevilla authored Oct 5, 2022
1 parent e099fdd commit 287202d
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 44 deletions.
1 change: 1 addition & 0 deletions cli/lib/commands/rm/command.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Future<void> run(List<String> args) async {
}
final elementPath = args.first;
final elementType = FileSystemEntity.typeSync(elementPath);
// ignore: exhaustive_cases
switch (elementType) {
case FileSystemEntityType.directory:
final dir = Directory(elementPath);
Expand Down
4 changes: 2 additions & 2 deletions cli/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 2 additions & 9 deletions examples/form_flow/lib/bootstrap.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,10 @@ class AppBlocObserver extends BlocObserver {
}

Future<void> bootstrap(FutureOr<Widget> 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());
}
6 changes: 3 additions & 3 deletions examples/form_flow/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions examples/form_flow/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions examples/launch_analytics/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
30 changes: 14 additions & 16 deletions examples/preference_navigation/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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<void> main() async {
await runZonedGuarded<Future<void>>(
() 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,
),
);
}
8 changes: 3 additions & 5 deletions examples/preference_navigation/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions examples/profile_accounts/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 287202d

Please sign in to comment.