ListenableProvider<T extends Listenable> constructor

ListenableProvider<T extends Listenable>({Key key, @required ValueBuilder<T> builder, Disposer<T> dispose, Widget child })

Creates a Listenable using builder and subscribes to it.

dispose can optionally passed to free resources when ListenableProvider is removed from the tree.

builder must not be null.

Implementation

ListenableProvider({
  Key key,
  @required ValueBuilder<T> builder,
  Disposer<T> dispose,
  Widget child,
}) : this._(
        key: key,
        delegate: _BuilderListenableDelegate(builder, dispose: dispose),
        child: child,
      );