findRoot static method

EyeDropperLayerScope findRoot(
  1. BuildContext context
)

Finds the root EyeDropperLayerScope in the widget tree.

Searches up the tree to find the topmost eye dropper scope.

Implementation

static EyeDropperLayerScope findRoot(BuildContext context) {
  return Data.maybeFindRoot<EyeDropperLayerScope>(context) ??
      Data.maybeFindMessenger<EyeDropperLayerScope>(context) ??
      (throw FlutterError(
        'No EyeDropperLayerScope found in context. Make sure to wrap your widget tree with an EyeDropperLayer.',
      ));
}