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

Close Menu #1

Open
crezoKind opened this issue Feb 6, 2019 · 3 comments
Open

Close Menu #1

crezoKind opened this issue Feb 6, 2019 · 3 comments
Labels
question Further information is requested

Comments

@crezoKind
Copy link

Olá pedro, poderia me ajudar em uma questão ?

como fechar o menu ao clicar em um item ?

children: options.map((item) {
return ListTile(
onTap: (){
// seria mais ou menos assim ?
MenuController _menu;
_menu.close();
},

@pedromassango pedromassango added the question Further information is requested label Feb 6, 2019
@supermarcos
Copy link

supermarcos commented Mar 21, 2019

Hi @crezoKind,

In the widget zoom_scaffold.dart there is a function called toggle which is the one called when opening and closing the menu. MenuState already has two states, closed and open and that function checks which one is in this moment to call either open or close functions.
If you want to close it yourself, I would say you could call the toggle function or the close one directly and both seem to be right for what you want.

You may need to change the way the menulist is built tho, in this sample is fine to have a list built like that, but it is harder to get hold to the index of the element you pressed and less performing than using a listview builder.
Check out this example: https://stackoverflow.com/questions/47085070/how-to-get-the-index-key-of-the-selected-item-in-the-list-flutter

Hope this helps
:)

@UnluckyY1
Copy link

Hi Iam new to flutter Am doing a School project and am trying to add slide menu to my project with the animation but had so many issue to add my body screen code to it can u help with that

@VigneswaranMuruganandan
Copy link

VigneswaranMuruganandan commented Jul 9, 2019

How to close the menu on tap in the ListTile. MenuController is not available in the Menuscreen. How to include MenuController in Menuscreen.
@pedromassango Please can u please split the ZoomScaffold class into separate.
I'm new to flutter, so it will be helpful for understanding.

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

No branches or pull requests

5 participants