Skip to content

Commit 9f97997

Browse files
committed
feat(bloc_observer): improve onChange log message
- Update onChange method in AppBlocObserver to log current and next state separately - Enhance readability of state changes in log output
1 parent a104520 commit 9f97997

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/bloc_observer.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ class AppBlocObserver extends BlocObserver {
88
@override
99
void onChange(BlocBase<dynamic> bloc, Change<dynamic> change) {
1010
super.onChange(bloc, change);
11-
log('onChange(${bloc.runtimeType}, $change)');
11+
log(
12+
'onChange(${bloc.runtimeType}, $change.currentState -> $change.nextState)',
13+
);
1214
}
1315

1416
@override

0 commit comments

Comments
 (0)