maybeOf static method

GlassSurfaceStyle? maybeOf(
  1. BuildContext context
)

Retrieves the nearest ambient GlassSurfaceStyle, or null if none is present.

Implementation

static GlassSurfaceStyle? maybeOf(BuildContext context) {
  return context
      .dependOnInheritedWidgetOfExactType<InheritedGlassSurfaceStyle>()
      ?.surfaceStyle;
}