-
-
Notifications
You must be signed in to change notification settings - Fork 272
Closed
Description
flutter build linux --debug
flutter build linux --release setWindowsSize()失效
Flutter (Channel stable, 3.3.4, on Debian GNU/Linux bookworm/sid 5.18.0-4-amd64
gcc (Debian 12.2.0-3) 12.2.0
cmake version 3.24.2example
void setWindowsSize() async {
WidgetsFlutterBinding.ensureInitialized();
if (Platform.isWindows || Platform.isLinux || Platform.isMacOS) {
WidgetsFlutterBinding.ensureInitialized();
await windowManager.ensureInitialized();
WindowOptions windowOptions = const WindowOptions(
size: Size(600, 850),
minimumSize: Size(600, 850),
center: true,
);
windowManager.waitUntilReadyToShow(windowOptions, () async {
await windowManager.show();
await windowManager.focus();
});
}
}
void main() async {
setWindowsSize();
runApp(const MyApp());
}Metadata
Metadata
Assignees
Labels
No labels