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

No have animation when click menu item drawer or open to hide from menu #47

Open
hafidprintsoft opened this issue Feb 16, 2024 · 2 comments

Comments

@hafidprintsoft
Copy link

Animation not active when hide drawer from item menu different when open the drawer menu

@cbassols
Copy link

I am experiencing an issue where the reverse animation does not activate when calling _advancedDrawerController.hideDrawer(). The drawer closes instantly without the expected transition effect.

@cbassols
Copy link

I have resolved the animation timing issue when closing the drawer by using WidgetsBinding.instance.addPostFrameCallback. This ensures that the drawer's hide operation (_advancedDrawerController.hideDrawer()) is scheduled to run after the widget tree has been rebuilt.

ListTile(
    leading: Icon(Icons.dashboard),
    title: Text('Dashboard'),
    onTap: () async {
        _updateTabSelection(0, 'Dashboard');
        WidgetsBinding.instance.addPostFrameCallback((_) {
            _advancedDrawerController.hideDrawer();
        });
    },
)

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

2 participants