select<T extends Bloc, R> static method

R select<T extends Bloc, R>(
  1. BuildContext context,
  2. R selector(
    1. T
    )
)

Similar to the SelectContext.select method from the Provider package.

Implementation

static R select<T extends Bloc, R>(
  BuildContext context,
  R Function(T) selector,
) =>
    context.select<BlocNotifier<T>, R>((a) => selector(a.bloc));