CollectionProvider<T extends CollectionChangeNotifier> constructor

CollectionProvider<T extends CollectionChangeNotifier>({
  1. Key? key,
  2. required Create<T> create,
  3. bool? lazy,
  4. TransitionBuilder? builder,
  5. Widget? child,
})

Creates a CollectionProvider using create and automatically dispose it when CollectionProvider is removed from the widget tree.

create must not be null.

Implementation

CollectionProvider({
  Key? key,
  required Create<T> create,
  bool? lazy,
  TransitionBuilder? builder,
  Widget? child,
}) : super(
        key: key,
        create: create,
        lazy: lazy,
        builder: builder,
        child: child,
      );