instance static method
Implementation
static Future<MenuContext> instance() {
return _mutex.protect(() async {
if (_instance == null) {
if (!kIsWeb &&
(defaultTargetPlatform == TargetPlatform.android ||
defaultTargetPlatform == TargetPlatform.windows)) {
_instance = FlutterMenuContext();
} else {
_instance = MenuContextImpl();
}
await _instance!.initialize();
}
return _instance!;
});
}