Selector2<A, B, S> class

Shows what builder returns for what selector picks from the A and the B of the providers above, as Selector does for one.

Selector2<Settings, Cart, bool>(
  selector: (context, settings, cart) =>
      settings.user.isNotEmpty && cart.items.isNotEmpty,
  builder: (context, canBuy, _) => Text(canBuy ? 'Buy' : '—'),
)
Inheritance

Constructors

Selector2({required ValueWidgetBuilder<S> builder, required S selector(BuildContext context, A value, B value2), Key? key, ShouldRebuild<S>? shouldRebuild, Widget? child})
Shows what builder returns for what selector picks of the A and the B above.

Properties

builder → ValueWidgetBuilder<S>
Builds what this widget shows from what selector picked.
finalinherited
hashCode → int
The hash code for this object.
no setterinherited
key → Key?
Tells this widget apart from its siblings; see Key.
finalinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
selector → S Function(BuildContext context)
Picks what builder builds with, the providers it finds through the context watched.
finalinherited
shouldRebuild → ShouldRebuild<S>?
Whether to build again for what selector picked, given what it picked before; null builds when the two differ.
finalinherited

Methods

createElement() → StatefulElement
Inflates this widget into a new element for the tree.
inherited
createState() → State<Selector0<S>>
Creates the state of a new element; it lives as long as the element.
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