of static method
Implementation
static MiniProgramRuntime of(BuildContext context) {
final scope = maybeOf(context);
if (scope == null) {
throw FlutterError.fromParts(<DiagnosticsNode>[
ErrorSummary('MiniProgramRuntimeScope not found in context.'),
ErrorDescription(
'MiniProgramPage requires either an explicit MiniProgramRuntime or '
'a MiniProgramRuntimeScope ancestor.',
),
]);
}
return scope.runtime;
}