✨ Better desktop platform window customization
This commit is contained in:
@ -1,3 +1,6 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:bitsdojo_window/bitsdojo_window.dart';
|
||||
import 'package:croppy/croppy.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:easy_localization_loader/easy_localization_loader.dart';
|
||||
@ -49,6 +52,15 @@ void main() async {
|
||||
GoRouter.optionURLReflectsImperativeAPIs = true;
|
||||
usePathUrlStrategy();
|
||||
|
||||
if (!kIsWeb && (Platform.isWindows || Platform.isLinux || Platform.isMacOS)) {
|
||||
doWhenWindowReady(() {
|
||||
appWindow.minSize = Size(480, 640);
|
||||
appWindow.size = Size(1280, 720);
|
||||
appWindow.alignment = Alignment.center;
|
||||
appWindow.show();
|
||||
});
|
||||
}
|
||||
|
||||
await SentryFlutter.init(
|
||||
(options) {
|
||||
options.dsn =
|
||||
|
@ -1,4 +1,8 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:bitsdojo_window/bitsdojo_window.dart';
|
||||
import 'package:easy_localization/easy_localization.dart';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:go_router/go_router.dart';
|
||||
import 'package:responsive_framework/responsive_framework.dart';
|
||||
@ -98,6 +102,12 @@ class AppRootScaffold extends StatelessWidget {
|
||||
key: globalRootScaffoldKey,
|
||||
body: Column(
|
||||
children: [
|
||||
if (!kIsWeb &&
|
||||
(Platform.isWindows || Platform.isLinux || Platform.isMacOS))
|
||||
Container(
|
||||
color: Theme.of(context).colorScheme.surface,
|
||||
child: WindowTitleBarBox(child: MoveWindow()),
|
||||
),
|
||||
ConnectionIndicator(),
|
||||
Expanded(child: innerWidget),
|
||||
],
|
||||
|
Reference in New Issue
Block a user