Added Desktop View

This commit is contained in:
2026-09-01 14:05:01 +02:00
parent 525aaa6555
commit 233d9feb94
2 changed files with 82 additions and 1 deletions
+11 -1
View File
@@ -1,5 +1,6 @@
import 'package:flutter/material.dart';
import 'DesktopView.dart';
import 'MobileView.dart';
class MainApp extends StatelessWidget {
@@ -31,7 +32,16 @@ class MainApp extends StatelessWidget {
brightness: Brightness.dark,
)
),
home: const MobileView(),
// Wide windows show all three pages next to each other, narrow ones
// switch between them through the navigation bar.
home: LayoutBuilder(
builder: (context, constraints) {
if (constraints.maxWidth >= DesktopView.minimumWidth) {
return const DesktopView();
}
return const MobileView();
},
),
);
}
}