watch<T> abstract method

T watch<T>(
  1. ProviderListenable<T> provider
)

Returns the value exposed by a provider and rebuild the widget when that value changes.

See also:

  • ProviderListenable.select, which allows a widget to filter rebuilds by observing only the selected properties.
  • listen, to react to changes on a provider, such as for showing modals.

Implementation

T watch<T>(ProviderListenable<T> provider);