You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ExpansionTile can't be programmatically opened or closed #7024
Need a way to close (or open) TwoLevelListItem programmatically
Reacted by David Martos, Adam Koch, MatthewManageMy, Kaushik Bharadwaj, Hosar, Michael Debertol, Saif Allah Khaled, Sebastian Engel, Edward zhang, despie and 21 more
Presently TwoLevelSublists aren't expanded initially. We should provide a way to specify the initial value for isExpanded and a TwoLevelListState method for expanding or collapsing the sublist.
This approach implies that programmatically expanding/collapsing sublists is not the common case. Doing so will require adding a GlobalKey to the sublist so that you can refer to its state later.
@HansMuller it doesn't fixed yet. initiallyExpanded applies only for initial state, so the key of the widget should be changed to apply changes, and then animation won't work
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
eseidelGoogle commentedon Nov 28, 2016
Thanks for the bug. Note there is some work soon to be done on TwoLevelListItem in #4765 and #4430.
HansMuller commentedon Nov 28, 2016
Sounds like a useful feature.
Presently TwoLevelSublists aren't expanded initially. We should provide a way to specify the initial value for isExpanded and a TwoLevelListState method for expanding or collapsing the sublist.
This approach implies that programmatically expanding/collapsing sublists is not the common case. Doing so will require adding a GlobalKey to the sublist so that you can refer to its state later.
Sound OK?
jtrunick commentedon Dec 5, 2016
I imagine it would not be the "usual case" as well. Sounds reasonable to me.
[-]TwoLevelListItem - programmatic close function[/-][+]ExpansionTile can't be programmatically opened or closed[/+]zoechi commentedon Jan 18, 2019
For workarounds see
boominadhaprakash commentedon Sep 23, 2019
Hi @zoechi
I am very much eager to know about any updates on this issue?
dipendra-sharma commentedon Nov 6, 2019
Use Random Key for a workaround.
key: PageStorageKey("${DateTime.now().millisecondsSinceEpoch}"),Alekcei commentedon Nov 25, 2019
need public state or animate controller
aydin-faruk commentedon Jan 24, 2020
This great solution
deshario commentedon Jan 28, 2020
@aydin-faruk How to add space before every sublist depend on its depper level in default example
aydin-faruk commentedon Feb 19, 2020
you can Use
or
or
deshario commentedon Mar 3, 2020
@jtrunick @boominadhaprakash @aydin-faruk
I found this better way to do it. https://gist.github.com/deshario/9981b58b870a019d60ec889cea0c73f4
aydin-faruk commentedon Mar 3, 2020
I can't run to your code. Can you share your Entry Model?
deshario commentedon Mar 17, 2020
@aydin-faruk
aydin-faruk commentedon Mar 17, 2020
class Entry wants "Listchildren"
This is vicious circle. What do you think ?
deshario commentedon Mar 25, 2020
@aydin-faruk I'm not sure maybe ... If u have better solution i'm ready to change my code
bero93 commentedon Apr 8, 2020
@aydin-faruk why there is Duration(seconds:20000) in your code?
HansMuller commentedon Apr 22, 2020
This was fixed some time ago, see https://api.flutter.dev/flutter/material/ExpansionTile/initiallyExpanded.html
2ZeroSix commentedon May 2, 2020
@HansMuller it doesn't fixed yet.
initiallyExpandedapplies only for initial state, so the key of the widget should be changed to apply changes, and then animation won't worklock commentedon May 21, 2020
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.