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),
|
WindowOptions(titleBarStyle: TitleBarStyle.hidden),
|
||||||
);
|
);
|
||||||
|
|
||||||
// if (Platform.isLinux) {
|
if (Platform.isLinux) {
|
||||||
// setWindowMinSize(const Size.square(500));
|
// setWindowMinSize(const Size.square(500));
|
||||||
// } else {
|
} else {
|
||||||
// await windowManager.setMinimumSize(Size.square(500));
|
await windowManager.setMinimumSize(Size.square(500));
|
||||||
// }
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
FlutterError.onError = (FlutterErrorDetails details) =>
|
FlutterError.onError = (FlutterErrorDetails details) =>
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,9 @@ class Appbar extends StatelessWidget implements PreferredSizeWidget {
|
||||||
return windowManager.maximize();
|
return windowManager.maximize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
final view = WidgetsBinding.instance.platformDispatcher.views.first;
|
||||||
|
double screenWidth = view.physicalSize.width / view.devicePixelRatio;
|
||||||
|
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onPanStart: (_) => windowManager.startDragging(),
|
onPanStart: (_) => windowManager.startDragging(),
|
||||||
child: AppBar(
|
child: AppBar(
|
||||||
|
|
@ -41,7 +44,7 @@ class Appbar extends StatelessWidget implements PreferredSizeWidget {
|
||||||
backgroundColor: backgroundColor,
|
backgroundColor: backgroundColor,
|
||||||
scrolledUnderElevation: scrolledUnderElevation,
|
scrolledUnderElevation: scrolledUnderElevation,
|
||||||
actionsPadding: const EdgeInsets.symmetric(horizontal: 8),
|
actionsPadding: const EdgeInsets.symmetric(horizontal: 8),
|
||||||
title: IgnorePointer(child: title),
|
title: IgnorePointer(child: Text(screenWidth.toString())),
|
||||||
flexibleSpace: GestureDetector(onDoubleTap: maximize),
|
flexibleSpace: GestureDetector(onDoubleTap: maximize),
|
||||||
actions: [
|
actions: [
|
||||||
...actions,
|
...actions,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue