id is used to uniquely identify multiple instances
of the same HydratedBloc type.
In most cases it is not necessary;
however, if you wish to intentionally have multiple instances
of the same HydratedBloc, then you must override id
and return a unique identifier for each HydratedBloc instance
in order to keep the caches independent of each other.
Storage prefix which can be overridden to provide a custom
storage namespace.
Defaults to runtimeType but should be overridden in cases
where stored data should be resilient to obfuscation or persist
between debug/release builds.
clear is used to wipe or invalidate the cache of a HydratedBloc.
Calling clear will delete the cached state of the bloc
but will not modify the current state of the bloc.
Called whenever a change occurs with the given change.
A change occurs when a new state is emitted.
onChange is called before the state of the cubit is updated.
onChange is a great spot to add logging/analytics for a specific cubit.