environment<T> method

Widget environment<T>(
  1. T create(
    1. BuildContext
    ), {
  2. bool notifyUpdate(
    1. InheritedSolidProvider<T> oldWidget
    )?,
})

Wraps the widget with a SolidProvider that provides data of type T.

Implementation

Widget environment<T>(
  T Function(BuildContext) create, {

  /// Whether to notify the update of the provider, defaults to false.
  bool Function(InheritedSolidProvider<T> oldWidget)? notifyUpdate,
}) =>
    SolidProvider<T>(create: create, notifyUpdate: notifyUpdate, child: this);