Remove unused setupDesktop function
Deleted the setupDesktop function from main.dart as it is no longer used. This helps clean up the codebase and removes unnecessary platform-specific initialization logic.
This commit is contained in:
parent
2cc3a55984
commit
459fce5f9c
|
|
@ -374,25 +374,3 @@ Future<int> getUnusedPort() {
|
||||||
return port;
|
return port;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
Future setupDesktop() async {
|
|
||||||
if (isDesktopPlatform()) {
|
|
||||||
WidgetsFlutterBinding.ensureInitialized();
|
|
||||||
await windowManager.ensureInitialized();
|
|
||||||
|
|
||||||
Map<String, String> env = Platform.environment;
|
|
||||||
var hideWindowOnStart = env["FLET_HIDE_WINDOW_ON_START"];
|
|
||||||
var hideAppOnStart = env["FLET_HIDE_APP_ON_START"];
|
|
||||||
debugPrint("hideWindowOnStart: $hideWindowOnStart");
|
|
||||||
debugPrint("hideAppOnStart: $hideAppOnStart");
|
|
||||||
|
|
||||||
await windowManager.waitUntilReadyToShow(null, () async {
|
|
||||||
if (hideWindowOnStart == null && hideAppOnStart == null) {
|
|
||||||
await windowManager.show();
|
|
||||||
await windowManager.focus();
|
|
||||||
} else if (hideAppOnStart != null) {
|
|
||||||
await windowManager.setSkipTaskbar(true);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue