runZoned<R> static method

  1. @Deprecated('This will be removed in v9.0.0. Use Bloc.observer/Bloc.transformer instead.')
R runZoned<R>(
  1. R body(), {
  2. BlocObserver? blocObserver,
  3. EventTransformer? eventTransformer,
})

Runs body in a fresh Zone using the provided overrides.

Implementation

@Deprecated(
  'This will be removed in v9.0.0. Use Bloc.observer/Bloc.transformer instead.',
)
static R runZoned<R>(
  R Function() body, {
  BlocObserver? blocObserver,
  EventTransformer<dynamic>? eventTransformer,
}) {
  final overrides = _BlocOverridesScope(blocObserver, eventTransformer);
  return _asyncRunZoned(body, zoneValues: {_token: overrides});
}