Refact. Flutter web, mid commit (#7482)

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou
2024-03-23 10:08:55 +08:00
committed by GitHub
parent 1c3a2e475d
commit a15cd62fd4
8 changed files with 187 additions and 68 deletions

View File

@@ -125,6 +125,10 @@ void runMainApp(bool startService) async {
await Future.wait([gFFI.abModel.loadCache(), gFFI.groupModel.loadCache()]);
gFFI.userModel.refreshCurrentUser();
runApp(App());
if (isWeb) {
// Web does not support window manager.
return;
}
// Set window option.
WindowOptions windowOptions = getHiddenTitleBarWindowOptions();
windowManager.waitUntilReadyToShow(windowOptions, () async {
@@ -150,11 +154,11 @@ void runMainApp(bool startService) async {
void runMobileApp() async {
await initEnv(kAppTypeMain);
if (isAndroid) androidChannelInit();
platformFFI.syncAndroidServiceAppDirConfigPath();
if (isAndroid) platformFFI.syncAndroidServiceAppDirConfigPath();
await Future.wait([gFFI.abModel.loadCache(), gFFI.groupModel.loadCache()]);
gFFI.userModel.refreshCurrentUser();
runApp(App());
await initUniLinks();
if (!isWeb) await initUniLinks();
}
void runMultiWindow(