BlocProviderExtension extension

Extends the BuildContext class with the ability to perform a lookup based on a Bloc type.

on

Methods

bloc<C extends Cubit<Object>>() → C
Performs a lookup using the BuildContext to obtain the nearest ancestor Cubit of type C. [...]
@Deprecated('Use context.read or context.watch instead. Will be removed in v7.0.0')