flutter/examples/stocks/lib
Hixie 066768f096 Make the checkbox in the stocks popup menu work.
Tapping on the menu item didn't animate the checkbox because the menu
takes 300ms to animate entirely away while the checkbox takes 200ms to
animate checked, and since the item with the checkbox was at the bottom,
we were only seeing about 60ms of the entire checkbox animation, which
isn't enough to notice it. So I moved it to the top of the menu.

Tapping on the checkbox didn't animate because nothing caused the menu
to rebuild when the callback was invoked. To trigger a rebuild, I now
call navigator.setState() explicitly, after changing out local state.

To make tapping the checkbox remove the menu, I also explicitly call
navigator.pop() in the code that handles the check. (I still explicitly
change the checkbox to show that that's possible. In principle one could
just treat the checkbox as an inert widget that happens to trigger pop,
and do all the checking/unchecking in the switch statement.)

I also made some minor style tweaks to files I was looking at while
dealing with this issue.
2015-09-28 11:15:05 -07:00
..
main.dart Port stocks to fn3 and introduce an App component. 2015-09-25 17:52:33 -07:00
stock_arrow.dart Port stocks to fn3 and introduce an App component. 2015-09-25 17:52:33 -07:00
stock_data.dart Move mojo frontend into services.dart 2015-09-16 19:13:50 -07:00
stock_home.dart Port stocks to fn3 and introduce an App component. 2015-09-25 17:52:33 -07:00
stock_list.dart Port stocks to fn3 and introduce an App component. 2015-09-25 17:52:33 -07:00
stock_menu.dart Make the checkbox in the stocks popup menu work. 2015-09-28 11:15:05 -07:00
stock_row.dart Port stocks to fn3 and introduce an App component. 2015-09-25 17:52:33 -07:00
stock_settings.dart Port stocks to fn3 and introduce an App component. 2015-09-25 17:52:33 -07:00
stock_types.dart Move example out of sky/packages to //examples 2015-08-07 17:04:50 -07:00