Open khanliKU opened 2 years ago
I created an app that works on Windows using bitsdojo_window + fluent_ui. I want to port this app to Linux and MacOS.
When I try to navigate to a new page the app is not stable. It stops responding:
Sample program
import 'package:fluent_ui/fluent_ui.dart'; import 'package:bitsdojo_window/bitsdojo_window.dart'; void main() { runApp(FluentApp( title: 'Flutter Demo', debugShowCheckedModeBanner: false, initialRoute: '/', routes: {'/': (_) => const DesktopHomePage ()} ), ); doWhenWindowReady(() { appWindow.alignment = Alignment.center; appWindow.show(); }); } class DesktopHomePage extends StatefulWidget { const DesktopHomePage({Key? key}) : super(key: key); @override State<DesktopHomePage> createState() => _DesktopHomePageState (); } class _DesktopHomePageState extends State<DesktopHomePage> { @override void initState() { const initialSize = Size(640, 360); appWindow.minSize = initialSize; appWindow.maxSize = initialSize; appWindow.size = initialSize; super.initState(); } @override Widget build(BuildContext context) { return Center( child: Button( child: const Text('Transition'), onPressed: () { Navigator.push( context, FluentPageRoute(builder: (context) => const NextPage()), ); }, ), ); } } class NextPage extends StatefulWidget { const NextPage({Key? key}) : super(key: key); @override State<NextPage> createState() => _NextPageState (); } class _NextPageState extends State<NextPage> { @override void initState() { const initialSize = Size(1080, 720); appWindow.minSize = initialSize; appWindow.maxSize = initialSize; appWindow.size = initialSize; super.initState(); } @override Widget build(BuildContext context) { return Center( child: const Text('Next Page'), ); } }
pubspec.yaml:
fluent_ui: ^3.12.0 system_theme: ^2.0.0 flutter_acrylic: ^1.0.0+2 bitsdojo_window: '>=0.1.2 <0.1.3'
I created an app that works on Windows using bitsdojo_window + fluent_ui. I want to port this app to Linux and MacOS.
When I try to navigate to a new page the app is not stable. It stops responding:
Sample program