BlocContainer class final
Builds, saves and provides Bloc independent of the build tree
Generally, applications would add all the blocs which would be required any where in the application. And then get them whenever they are needed
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
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 Methods
-
add<
T> (BlocWithArgBuilder< T> builder) → void - Adds a blocs to internal resolver
-
clear(
[Type? type]) → void - Clears blocs from the container
-
clearCache(
) → void - Removes all blocs from the cache
-
get<
R extends Bloc> ({BuildContext? context, dynamic arg, bool useCache = true}) → R - Called whenever an application needs an already added Bloc
-
removeFromCache(
{Type? type, Bloc? bloc}) → void - Removes blocs from the cache