Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent and duplicate drawers on Flutter 2.0. #8

Open
SalahAdDin opened this issue Apr 12, 2021 · 0 comments
Open

Inconsistent and duplicate drawers on Flutter 2.0. #8

SalahAdDin opened this issue Apr 12, 2021 · 0 comments

Comments

@SalahAdDin
Copy link

Recently, I've tested this package in order tu fulfull my client's requirement on its application.

First, as you can see in the pull request, i updated the library to null-safety. Then, I put it on my project and i folder my custom drawer as follows:

class MainLayout extends HookWidget {
  final GlobalKey<ScaffoldState> _scaffoldKey = GlobalKey<ScaffoldState>();

  @override
  Widget build(BuildContext context) {
    Size size = MediaQuery.of(context).size;
    return Scaffold(
      appBar: Header(),
      body: FoldableSidebarBuilder(
        drawer: SideMenu(),
        screenContents: Container(),
        status: FSBStatus.FSB_OPEN,
      ),
    );
  }
}

With my drawer as follows:

class SideMenu extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Container(
      child: Drawer(
        child: SafeArea(
          child: Column(
            children: <Widget>[
              SideMenuHeader(
                displayedUserName: 'Luis Alaguna',
              ),
              Expanded(
                  child: ListView(
                padding: EdgeInsets.zero,
                children: <Widget>[
                  ExpansionTile(
                    title: Text("Dashboad"),
                    children: <Widget>[
                      ListTile(
                        leading: Icon(
                          MdiIcons.accountGroupOutline,
                          // size: 40,
                        ),
                        title: Text('Users'),
                        onTap: () {},
                      ),
                      ListTile(
                        leading: Icon(MdiIcons.poll),
                        title: Text('Surveys'),
                        onTap: () {},
                      ),
                      ListTile(
                          leading: Icon(MdiIcons.cogs), title: Text('Setup')),
                    ],
                  ),
                  ExpansionTile(
                    title: Text('Content'),
                    children: <Widget>[
                      ListTile(
                          leading: Icon(MdiIcons.bookInformationVariant),
                          title: Text('Bilgi')),
                      ListTile(
                          leading: Icon(MdiIcons.meditation),
                          title: Text('Tedavi')),
                      ListTile(
                          leading: Icon(MdiIcons.flask),
                          title: Text('Geliştirmeler')),
                      ListTile(
                          leading: Icon(MdiIcons.tooltipTextOutline),
                          title: Text('Hikayeler')),
                    ],
                  ),
                  ListTile(
                    leading: Icon(Icons.settings),
                    title: Text('Ayarlar'),
                  )
                ],
              )),
              SideMenuFooter(),
            ],
          ),
        ),
      ),
    );
  }
}

Well, the problem is the animation has inconsistences and after open the drawer, the drawer is duplicated as half; you can see it on the video.
https://user-images.githubusercontent.com/5034215/114433613-b2c6bc80-9bca-11eb-8ec8-a68098186654.mp4

What's the way to fix this?

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant