test (dont use this)
This commit is contained in:
parent
70793a2f77
commit
a7a8dc5afc
2 changed files with 9 additions and 6 deletions
|
|
@ -65,11 +65,11 @@ 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) {
|
||||
// setWindowMinSize(const Size.square(500));
|
||||
} else {
|
||||
await windowManager.setMinimumSize(Size.square(500));
|
||||
}
|
||||
}
|
||||
|
||||
FlutterError.onError = (FlutterErrorDetails details) =>
|
||||
|
|
|
|||
|
|
@ -34,6 +34,9 @@ class Appbar extends StatelessWidget implements PreferredSizeWidget {
|
|||
return windowManager.maximize();
|
||||
}
|
||||
|
||||
final view = WidgetsBinding.instance.platformDispatcher.views.first;
|
||||
double screenWidth = view.physicalSize.width / view.devicePixelRatio;
|
||||
|
||||
return GestureDetector(
|
||||
onPanStart: (_) => windowManager.startDragging(),
|
||||
child: AppBar(
|
||||
|
|
@ -41,7 +44,7 @@ class Appbar extends StatelessWidget implements PreferredSizeWidget {
|
|||
backgroundColor: backgroundColor,
|
||||
scrolledUnderElevation: scrolledUnderElevation,
|
||||
actionsPadding: const EdgeInsets.symmetric(horizontal: 8),
|
||||
title: IgnorePointer(child: title),
|
||||
title: IgnorePointer(child: Text(screenWidth.toString())),
|
||||
flexibleSpace: GestureDetector(onDoubleTap: maximize),
|
||||
actions: [
|
||||
...actions,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue