ScopeWidgetAccess<W extends ScopeWidgetBase<W> > class
final
The three accessors of one ScopeWidgetBase, with its type argument named once.
final class ApiConfig extends ScopeWidgetBase<ApiConfig> {
static const access = ScopeWidgetAccess<ApiConfig>();
…
}
final key = ApiConfig.access.select(context, (widget) => widget.apiKey);
Constructors
- ScopeWidgetAccess()
-
Creates an accessor for the widget scope
W.const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
maybeOf(
BuildContext context, {required bool listen}) → W? - Tries to find and return the scope widget.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
of(
BuildContext context, {required bool listen}) → W - Finds and returns the scope widget, or throws.
-
select<
V extends Object?> (BuildContext context, V selector(W widget)) → V - Selects a single parameter of the scope and subscribes to it.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited