of static method

LinearGaugeState scope method.

Implementation

static LinearGaugeState of(BuildContext context) {
  late LinearGaugeState scope;

  final InheritedWidget widget = context
      .getElementForInheritedWidgetOfExactType<LinearGaugeState>()!
      .widget as InheritedWidget;

  if (widget is LinearGaugeState) {
    scope = widget;
  }

  return scope;
}