abuanwar072 / Flutter-Responsive-Admin-Panel-or-Dashboard

Responsive Admin Panel or Dashboard using Flutter
https://youtu.be/_uOgXpEHNbc
MIT License
6.61k stars 1.87k forks source link

How drawer click works? #36

Closed zanpen2000 closed 2 years ago

zanpen2000 commented 2 years ago

Hi!, I'm newer of flutter, I clone the whole project and can not find the code of drawer item click.

I want some working code to learn how drawer item click, can any body help me ?

that would be very help for me! THANKS!!!

hustler-manishdayma commented 2 years ago

If You want to open Drawer programmatically then just write this code in inkwell or any tap method to run this.

Scaffold.of(context).openDrawer();

zanpen2000 commented 2 years ago

@hustler-manishdayma

Thanks for your answers.

Maybe I didn’t make it clear, what I mean is, how to respond to the click event of the menu item can realize the "partial refresh" of the page on the right, because I designed the display page on the right into two parts, the upper part is the public part, click The menu item is not refreshed (such as the login user name), and the following part uses the datatable2 component to refresh.

Currently, I use the IndexStacked component, but the components in the children of this component need to be created at the beginning, which leads to unnecessary data requests and constructions for all the datatables corresponding to my menu items when the program starts ( I want to make a data request and build when the menu item is clicked).

Maybe this question is a bit too big, sorry, I will learn more and think of a way.

Thanks anyway! :small_airplane: