select<M extends Listenable, V extends Object?> static method
V
select<M extends Listenable, V extends Object?>(
- BuildContext context,
- V selector(
- M model
override
Subscribes to one value of the model and returns it.
The caller is rebuilt on notifyListeners, and only when that value
has changed.
Implementation
static V select<M extends Listenable, V extends Object?>(
BuildContext context,
V Function(M model) selector,
) =>
ScopeInheritedContext.select<
ScopeNotifier<M>,
ScopeModelContext<ScopeNotifier<M>, M>,
V
>(context, (context) => selector(context.model));