maybeOf static method

GlassAdaptiveScopeData? maybeOf(
  1. BuildContext context
)

Returns the nearest GlassAdaptiveScopeData, or null if not found.

Glass widgets use this variant internally — if no scope is present, the normal quality resolution chain runs unchanged.

Implementation

static GlassAdaptiveScopeData? maybeOf(BuildContext context) {
  return context
      .dependOnInheritedWidgetOfExactType<_InheritedAdaptiveQuality>()
      ?.data;
}