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),
|
||||
);
|
||||
|
||||
// if (Platform.isLinux) {
|
||||
// setWindowMinSize(const Size.square(500));
|
||||
// } else {
|
||||
// await windowManager.setMinimumSize(Size.square(500));
|
||||
// }
|
||||
if (Platform.isLinux) {
|
||||
final view = WidgetsBinding.instance.platformDispatcher.views.first;
|
||||
double screenWidth = view.physicalSize.width / view.devicePixelRatio;
|
||||
|
||||
if (screenWidth > 500) setWindowMinSize(const Size.square(500));
|
||||
} else {
|
||||
await windowManager.setMinimumSize(Size.square(500));
|
||||
}
|
||||
}
|
||||
|
||||
FlutterError.onError = (FlutterErrorDetails details) =>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue