test not setting min size on small screens
This commit is contained in:
parent
70793a2f77
commit
2ea6c07307
1 changed files with 8 additions and 5 deletions
|
|
@ -65,11 +65,14 @@ void main() async {
|
||||||
WindowOptions(titleBarStyle: TitleBarStyle.hidden),
|
WindowOptions(titleBarStyle: TitleBarStyle.hidden),
|
||||||
);
|
);
|
||||||
|
|
||||||
// if (Platform.isLinux) {
|
if (Platform.isLinux) {
|
||||||
// setWindowMinSize(const Size.square(500));
|
final view = WidgetsBinding.instance.platformDispatcher.views.first;
|
||||||
// } else {
|
double screenWidth = view.physicalSize.width / view.devicePixelRatio;
|
||||||
// await windowManager.setMinimumSize(Size.square(500));
|
|
||||||
// }
|
if (screenWidth > 500) setWindowMinSize(const Size.square(500));
|
||||||
|
} else {
|
||||||
|
await windowManager.setMinimumSize(Size.square(500));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
FlutterError.onError = (FlutterErrorDetails details) =>
|
FlutterError.onError = (FlutterErrorDetails details) =>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue