-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #340 from dwyl/refactor_#339
[PR] Code refactor
- Loading branch information
Showing
25 changed files
with
763 additions
and
627 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export 'package:flutter_bloc/flutter_bloc.dart'; | ||
|
||
export 'todo/todo_bloc.dart'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import 'package:flutter_bloc/flutter_bloc.dart'; | ||
import 'package:lumberdash/lumberdash.dart'; | ||
|
||
class GlobalLogBlocObserver extends BlocObserver { | ||
@override | ||
void onEvent(Bloc bloc, Object? event) { | ||
super.onEvent(bloc, event); | ||
logMessage('${bloc.runtimeType} event dispatch: $event.'); | ||
} | ||
|
||
@override | ||
void onChange(BlocBase bloc, Change change) { | ||
super.onChange(bloc, change); | ||
} | ||
|
||
@override | ||
void onTransition(Bloc bloc, Transition transition) { | ||
super.onTransition(bloc, transition); | ||
logMessage('${bloc.runtimeType} transition: Event ${transition.event} was dispatched. ${transition.currentState} → ${transition.nextState}'); | ||
} | ||
|
||
@override | ||
void onError(BlocBase bloc, Object error, StackTrace stackTrace) { | ||
super.onError(bloc, error, stackTrace); | ||
|
||
logWarning('${bloc.runtimeType} error: $error.'); | ||
logError('Stacktrace: \n$stackTrace'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export 'package:colorize_lumberdash/colorize_lumberdash.dart'; | ||
export 'package:lumberdash/lumberdash.dart'; | ||
|
||
export 'log_bloc_observer.dart'; |
Oops, something went wrong.