4

I'm making an admin dashboard with a flutter web that has a drawer. but when I try to access it on the mobile, drawer it can't be responsive yet ... how do I access the drawer on the mobile in the form of an icon list?.

body: Container(
        width: MediaQuery.of(context).size.width,
        height: MediaQuery.of(context).size.height,
        child: Row(
          children: <Widget>[
             Drawer(
                child: ListView(
                  padding: EdgeInsets.zero,
                  children: <Widget>[
                    DrawerHeader(
                      margin: EdgeInsets.zero,
                      child: Center(
                        child: Image(
                          image: ExactAssetImage("images/image.png"),
                        ),
                      ),
                    ),
                    ListTile(
                      leading: Icon(Icons.location_city),
                      title: Text('Partner'),
                      onTap: () {
                        _setPage(ClientPage());
                      },
                    ),
                    ListTile(
                      leading: Icon(Icons.multiline_chart),
                      title: Text('Proyek'),
                      onTap: () {
                        _setPage(ProyekPage());
                      },
                    ),
                  ],
                );
            ),
          ],
        ),
      ),

this display drawer on a laptop drawer on laptop

and this is display drawe on mobiledrawer on mobile

there is no difference: '

OceanL
  • 469
  • 1
  • 5
  • 21
  • 1
    Possible duplicate of [make responsive web on flutter web](https://stackoverflow.com/questions/57491784/make-responsive-web-on-flutter-web) – dazza5000 Aug 20 '19 at 04:14
  • if I use that, I'm a little confused by how to implement it into the widget – OceanL Aug 20 '19 at 04:19
  • 1
    Try this plugin https://pub.dev/packages/responsive_scaffold. I found it easy to use. – Tushar Pol Aug 20 '19 at 04:45

1 Answers1

1

You can use LayoutBuilder to determine the page's screen size and update the children widgets base from the parent's dimensions. Check this similar Stack Overflow post for the sample.

Omatt
  • 8,564
  • 2
  • 42
  • 144