Static Nav Drawer in landscape
This commit is contained in:
@@ -565,6 +565,7 @@ class _MyHomePageState extends State<MyHomePage> {
|
||||
|
||||
avgProd = avgProd / _avgProdCount;
|
||||
pastAvgProd = pastAvgProd / _pastAvgProdCount;
|
||||
bool landscape=((MediaQuery.of(context).size.width / MediaQuery.of(context).size.height) > 1);
|
||||
return Scaffold(
|
||||
floatingActionButton: FloatingActionButton.extended(
|
||||
onPressed: () {
|
||||
@@ -602,13 +603,13 @@ class _MyHomePageState extends State<MyHomePage> {
|
||||
//Container(color: Colors.red,child: Text("Offline",style:TextStyle(fontSize: 5))),
|
||||
],
|
||||
)),
|
||||
drawer: navDrawer(context, 0),
|
||||
drawer: landscape ? null : navDrawer(context, 0),
|
||||
body: SafeArea(
|
||||
child: Row(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
mainAxisAlignment: MainAxisAlignment.start,
|
||||
children: [
|
||||
((MediaQuery.of(context).size.width / MediaQuery.of(context).size.height) > 1) ?navDrawer(context, 0) : Container(),
|
||||
landscape?navDrawer(context, 0) : Container(),
|
||||
(User.activities.isEmpty) ? Container(
|
||||
width: 1000,
|
||||
child: Column(
|
||||
|
||||
Reference in New Issue
Block a user