Static Nav Drawer in landscape
This commit is contained in:
@@ -30,6 +30,8 @@ class _CategoriesState extends State<Categories> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
bool landscape=((MediaQuery.of(context).size.width / MediaQuery.of(context).size.height) > 1);
|
||||
|
||||
return Scaffold(
|
||||
floatingActionButton: FloatingActionButton.extended(
|
||||
onPressed: () {
|
||||
@@ -60,13 +62,22 @@ class _CategoriesState extends State<Categories> {
|
||||
]) : Container(),
|
||||
],
|
||||
)),
|
||||
drawer: navDrawer(context, 4),
|
||||
body: Container(
|
||||
padding: EdgeInsets.all(10),
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
children: PrintCats(),
|
||||
))));
|
||||
drawer: landscape ? null : navDrawer(context, 4),
|
||||
body: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
landscape?navDrawer(context, 4) : Container(),
|
||||
Expanded(
|
||||
child: Container(
|
||||
padding: EdgeInsets.all(10),
|
||||
child: SingleChildScrollView(
|
||||
child: Column(
|
||||
children: PrintCats(),
|
||||
))),
|
||||
),
|
||||
],
|
||||
));
|
||||
}
|
||||
|
||||
void UpdateList() async {
|
||||
|
||||
Reference in New Issue
Block a user