Skip to content

Commit

Permalink
update example
Browse files Browse the repository at this point in the history
  • Loading branch information
felangel committed Oct 7, 2020
1 parent 1f2f8fd commit 8dbac90
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 2 deletions.
3 changes: 3 additions & 0 deletions packages/bloc/example/analysis_options.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
analyzer:
enable-experiment:
- non-nullable
4 changes: 2 additions & 2 deletions packages/bloc/example/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import 'package:bloc/bloc.dart';

class SimpleBlocObserver extends BlocObserver {
@override
void onEvent(Bloc bloc, Object event) {
void onEvent(Bloc bloc, Object? event) {
print('bloc: ${bloc.runtimeType}, event: $event');
super.onEvent(bloc, event);
}
Expand All @@ -22,7 +22,7 @@ class SimpleBlocObserver extends BlocObserver {
}

@override
void onError(Cubit cubit, Object error, StackTrace stackTrace) {
void onError(Cubit cubit, Object error, StackTrace? stackTrace) {
print('cubit: ${cubit.runtimeType}, error: $error');
super.onError(cubit, error, stackTrace);
}
Expand Down
11 changes: 11 additions & 0 deletions packages/bloc/example/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: example
description: A Dart package:bloc example
version: 0.0.1
publish_to: none

environment:
sdk: ">=2.10.0-99.0.dev <2.10.0"

dependencies:
bloc:
path: ../

0 comments on commit 8dbac90

Please sign in to comment.