runMPApp function

void runMPApp(
  1. Widget app
)

Implementation

void runMPApp(Widget app) async {
  if (kIsMPFlutter) {
    if (kIsMPFlutterDevmode) {
      WidgetsFlutterBinding.ensureInitialized();
      await windowManager.ensureInitialized();
      WindowOptions windowOptions = WindowOptions(
        size: Size(414, 896),
      );
      windowManager.waitUntilReadyToShow(windowOptions, () async {
        await windowManager.show();
        await windowManager.focus();
      });
      runApp(MPApp(child: app));
    } else {
      setupMemoryManager();
      runApp(MPApp(child: app));
      MPFlutterSplashManager.hideSplash();
    }
  } else {
    runApp(app);
  }
}