ObservableLocatorScope.child constructor

ObservableLocatorScope.child(
  1. {Key? key,
  2. required CreateBinders create,
  3. TransitionBuilder? builder,
  4. Widget? child}
)

Create a scope that provides a child of an ancestor ObservableLocator.

This can be used to scope unique or specific values within an observable locator to a specific widget subtree.

There must be an ancestor ObservableLocatorScope that provides a parent locator. Additionally, swapping parent nodes of a branch is not supported. However, adding or pruning leaves / branches of an observable locator tree is allowed,

Implementation

factory ObservableLocatorScope.child({
  Key? key,
  required CreateBinders create,
  TransitionBuilder? builder,
  Widget? child,
}) =>
    _ChildObservableLocatorScope(
      key: key,
      create: create,
      builder: builder,
      child: child,
    );