of static method
Implementation
static MiniProgramScopeHandle of(BuildContext context) {
final handle = maybeOf(context);
if (handle == null) {
throw FlutterError.fromParts(<DiagnosticsNode>[
ErrorSummary(
'MiniProgramScope not found. Wrap your app with MiniProgramScope(config: buildMiniProgramConfig(), child: MyApp()).',
),
ErrorDescription(
'Mini-program APIs need a MiniProgramScope ancestor so the SDK can '
'find the host runtime configuration.',
),
]);
}
return handle;
}