Added Desktop View
This commit is contained in:
@@ -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();
|
||||
},
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user