ListenableProvider<T extends Listenable?> constructor

ListenableProvider<T extends Listenable?>({
  1. Key? key,
  2. required Create<T> create,
  3. Dispose<T>? dispose,
  4. bool? lazy,
  5. TransitionBuilder? builder,
  6. Widget? child,
})

Creates a Listenable using create and subscribes to it.

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

create must not be null.

Implementation

ListenableProvider({
  Key? key,
  required Create<T> create,
  Dispose<T>? dispose,
  bool? lazy,
  TransitionBuilder? builder,
  Widget? child,
}) : super(
        key: key,
        startListening: _startListening,
        create: create,
        dispose: dispose,
        lazy: lazy,
        builder: builder,
        child: child,
      );