root static method

Widget root({
  1. Key? key,
  2. List<ContextWatcher<Object>> additionalWatchers = const [],
  3. required Widget child,
})

Provides the ability to watch observable values using observable.watch(context) within a build method.

This widget should be placed at the root of the widget tree.

Provide additionalWatchers to add custom observable types support.

Implementation

static Widget root({
  Key? key,
  List<ContextWatcher> additionalWatchers = const [],
  required Widget child,
}) => ContextWatchRoot(
  key: key,
  additionalWatchers: additionalWatchers,
  child: child,
);