bloc property

  1. @override
AlwaysAliveRefreshable<B> bloc
latefinal

Obtains the Bloc associated with this provider, without listening to state changes.

This is typically used to invoke methods on a Bloc. For example:

Button(
  onTap: () => ref.read(counterProvider.bloc).add(Increment()),
)

This listenable will notify its state if the Bloc or Cubit instance changes. This may happen if the provider is refreshed or one of its dependencies has changes.

Implementation

@override
late final AlwaysAliveRefreshable<B> bloc = _notifier(this);