maybeOf static method

GlassEditController? maybeOf(
  1. BuildContext context
)

Returns the nearest GlassEditController in the widget tree, or null if none is found.

Implementation

static GlassEditController? maybeOf(BuildContext context) {
  final inherited =
      context.dependOnInheritedWidgetOfExactType<_InheritedGlassEditScope>();
  return inherited?.controller;
}