maybeOf static method

Returns the nearest enclosing GlassNavigationStackState, or null if none found.

Implementation

static GlassNavigationStackState? maybeOf(BuildContext context) {
  return context
      .getInheritedWidgetOfExactType<_GlassNavigationStackScope>()
      ?.state;
}