HydratedBlocOverrides class

This class extends BlocOverrides and facilitates overriding Storage in addition to BlocObserver and EventTransformer. It should be extended by another class in client code with overrides that construct a custom implementation. For example:

class MyStorage extends Storage {
  ...
  // A custom Storage implementation.
  ...
}

void main() {
  HydratedBlocOverrides.runZoned(() {
    ...
    // HydratedBloc instances will use MyStorage.
    ...
  }, storage: MyStorage());
}
Inheritance

Constructors

HydratedBlocOverrides()

Properties

blocObserver BlocObserver
The BlocObserver that will be used within the current Zone.
no setteroverride
eventTransformer EventTransformer
The EventTransformer that will be used within the current Zone.
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
storage Storage
The Storage that will be used within the current Zone.
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

current HydratedBlocOverrides?
Returns the current HydratedBlocOverrides instance.
no setter

Static Methods

runZoned<R>(R body(), {BlocObserver? blocObserver, EventTransformer? eventTransformer, Storage? storage}) → R
Runs body in a fresh Zone using the provided overrides.
override