Skip to content

Commit 609bf0c

Browse files
committed
fix(hydrated_bloc): make defaultOnHydrationError public
1 parent 2e57fd8 commit 609bf0c

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

packages/hydrated_bloc/lib/src/hydrated_bloc.dart

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ typedef OnHydrationError = HydrationErrorBehavior Function(
2424
StackTrace stackTrace,
2525
);
2626

27-
const _defaultHydrationErrorBehavior = HydrationErrorBehavior.overwrite;
28-
29-
HydrationErrorBehavior _defaultOnHydrationError(
27+
/// The default hydration `onError` implementation.
28+
/// Returns [HydrationErrorBehavior.overwrite].
29+
HydrationErrorBehavior defaultOnHydrationError(
3030
Object error,
3131
StackTrace stackTrace,
3232
) {
33-
return _defaultHydrationErrorBehavior;
33+
return HydrationErrorBehavior.overwrite;
3434
}
3535

3636
/// {@template hydrated_bloc}
@@ -170,7 +170,7 @@ mixin HydratedMixin<State> on BlocBase<State> {
170170
/// ```
171171
void hydrate({
172172
Storage? storage,
173-
OnHydrationError onError = _defaultOnHydrationError,
173+
OnHydrationError onError = defaultOnHydrationError,
174174
}) {
175175
__storage = storage ??= HydratedBloc.storage;
176176
try {

0 commit comments

Comments
 (0)