ObservableLocatorScope.value constructor

ObservableLocatorScope.value(
  1. ObservableLocator locator, {
  2. Key? key,
  3. TransitionBuilder? builder,
  4. Widget? child,
})

Create a scope that provides the given ObservableLocator.

Note that the widget will still dispose the locator when the widget's state is itself disposed.

This should typically be used as a root scope and must not shadow an ancestor observable locator scope.

Implementation

factory ObservableLocatorScope.value(
  ObservableLocator locator, {
  Key? key,
  TransitionBuilder? builder,
  Widget? child,
}) =>
    _ValueObservableLocatorScope(
      key: key,
      locator: locator,
      builder: builder,
      child: child,
    );