Static Nav Drawer in landscape

This commit is contained in:
Sewmina
2022-04-25 15:01:05 +05:30
parent 9f5ef1a7f1
commit 8af736fab1
11 changed files with 507 additions and 366 deletions

View File

@@ -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 {