maybeOf static method

MiniProgramScopeHandle? maybeOf(
  1. BuildContext context
)

Implementation

static MiniProgramScopeHandle? maybeOf(BuildContext context) {
  final scope = context
      .dependOnInheritedWidgetOfExactType<_InheritedMiniProgramScope>();
  if (scope == null) {
    return null;
  }

  return MiniProgramScopeHandle._(context, scope.controller);
}