mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
Menu in StocksApp should animate out
This CL teaches PopupMenu how to animate out as well as in. Also, I've changed the PopupMenuItem animations to be driven from the PopupMenu itself, which makes it easier to run the animation in reverse when closing the menu. TBR=rafaelw@chromium.org Review URL: https://codereview.chromium.org/1033913002
This commit is contained in:
parent
0abd3c9ef3
commit
08f2a275ad
@ -145,8 +145,11 @@ class StocksApp extends App {
|
|||||||
// TODO(abarth): We should close the menu when you tap away from the
|
// TODO(abarth): We should close the menu when you tap away from the
|
||||||
// menu rather than when you tap on the menu.
|
// menu rather than when you tap on the menu.
|
||||||
setState(() {
|
setState(() {
|
||||||
_menuController.close();
|
_menuController.close().then((_) {
|
||||||
_menuController = null;
|
setState(() {
|
||||||
|
_menuController = null;
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
));
|
));
|
||||||
|
Loading…
Reference in New Issue
Block a user