clear static method
Clears blocs from the container
If a type
is provided then blocs registered with this type are cleared
otherwise all values are cleared.
This method also clears the cached blocs
Implementation
static void clear([Type? type]) {
if (type == null) {
_blocs.clear();
_cache.clear();
} else {
_blocs.remove(type);
_cache.removeWhere((key, value) => key.type == type);
}
}