Commit Graph

7 Commits

Author SHA1 Message Date
Hixie
03e094aa1b Convert Persistent Bottom Sheets to a Scaffold API
- `Scaffold.of(context).showBottomSheet(widget);`
- Returns an object with .closed Future and .close() method.
- Uses a StateRoute to handle back button.
- Take the Navigator logic out of the BottomSheet widget.
- Support showing a sheet while an old one is going away.
- Add Navigator.remove().
2015-11-20 10:49:10 -08:00
Hixie
309d25d4bb Move Material page animations to Material layer.
PageRoute is now MaterialPageRoute.

This also changes the following:

- Now the HeroController is a Navigator observer, rather than a feature
  of HeroPageRoutes, which are gone. This means heroes can work between
  any kind of ModalRoute now.

- ModalPageRoute is moved from modal_barrier.dart to routes.dart.

- It allows routes to opt-out of their modal barrier being a shortcut to
  popping the route.

- Features of PageRoute that aren't Material-specific get promoted to
  ModalRoute features: storage, the subtree key, offstageness...

The AnimatedModalBarrier is still a ModalRoute feature.
2015-11-16 12:53:12 -08:00
Hixie
d041f3ead5 More resilient Widget tests
- force the time dilation to 1.0 for the Widget tests, so that a local
  change doesn't break all the tests during development.
- add missing license block to all the files.
- set ui.window.onBeginFrame to null when you use WidgetTester, so that
  the engine doesn't trigger any confusing frames after our fake frames.
2015-11-16 12:29:25 -08:00
Hans Muller
1aac53a500 showSnackBar() returns a Future, clears its placeholder
TransitionRoute completer is now optional.
2015-11-12 08:57:09 -08:00
Hans Muller
b4c3970319 Add a unit test for persistent bottom sheets 2015-11-11 08:49:50 -08:00
Hans Muller
5e08b98e0d Refactor bottom sheet support, add a bottom sheet to the stocks demo
Factored OverlayRoute out of the modal and persistent bottom sheet clases, since the bottom sheet classes need to drive the performance.

Added a bottom sheet to the stocks demo: long-press on a stock shows a modal bottom sheet.

Made AnimatedModalBarrier public.
2015-11-10 11:27:17 -08:00
Hans Muller
766eda6bf6 Restored BottomSheet dismiss tap 2015-11-03 09:34:28 -08:00