InheritedProvider<T> constructor

  1. {Key key,
  2. Create<T> create,
  3. T update(
    1. BuildContext context,
    2. T value
  4. UpdateShouldNotify<T> updateShouldNotify,
  5. void debugCheckInvalidValueType(
    1. T value
  6. StartListening<T> startListening,
  7. Dispose<T> dispose,
  8. TransitionBuilder builder,
  9. bool lazy,
  10. Widget child}

Creates a value, then expose it to its descendants.

The value will be disposed of when InheritedProvider is removed from the widget tree.


  Key key,
  Create<T> create,
  T Function(BuildContext context, T value) update,
  UpdateShouldNotify<T> updateShouldNotify,
  void Function(T value) debugCheckInvalidValueType,
  StartListening<T> startListening,
  Dispose<T> dispose,
  bool lazy,
  Widget child,
})  : _lazy = lazy,
      _delegate = _CreateInheritedProvider(
        create: create,
        update: update,
        updateShouldNotify: updateShouldNotify,
        debugCheckInvalidValueType: debugCheckInvalidValueType,
        startListening: startListening,
        dispose: dispose,
      super(key: key, child: child);