ProxyProvider0<R> class
Provides the R update makes from the one it made before, and makes
it anew each time this widget is replaced or a provider update depends
on (Provider.of(context), context.watch) changes: the widgets that
watch it are rebuilt when the new value is not == the one before (or
as updateShouldNotify says), which is then handed to dispose.
create makes a first value for update to start from; the first is
made when the value is first read unless lazy is false. The last is
handed to dispose when this widget leaves the tree. A value that is a
Listenable or a Stream fails an assert, as with Provider.
ProxyProvider0<String>(
update: (context, previous) => 'Hello, ${context.watch<Settings>().user}',
child: app,
)
- Inheritance
-
- Object
- Widget
- StatelessWidget
- SingleChildStatelessWidget
- InheritedProvider<
R> - ProxyProvider0
- Implementers
Constructors
-
ProxyProvider0({required R update(BuildContext context, R? value), Key? key, Create<
R> ? create, UpdateShouldNotify<R> ? updateShouldNotify, Dispose<R> ? dispose, bool? lazy, TransitionBuilder? builder, Widget? child}) -
Provides what
updatemakes.
Properties
- builder → TransitionBuilder?
-
Builds the child below this provider, from the one given.
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Tells this widget apart from its siblings; see Key.
finalinherited
- lazy → bool
-
Whether the value is made only when it is first read; else when this
widget is placed in the tree.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
build(
BuildContext context) → Widget -
Describes this part of the interface; called when the widget is placed
in the tree, whenever its parent gives it a new widget, and when its
element is marked dirty.
inherited
-
buildWithChild(
BuildContext context, Widget? child) → Widget -
What this widget shows around
child.inherited -
createElement(
) → StatelessElement -
Inflates this widget into a new element for the tree.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Adds what describes this widget in its element's description
(Element.describe) to
properties, those not worth showing (a default) left out; an override calls this first. A render object widget adds only what its render object does not show. Only Element.describe calls it: a frame never does.inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited