Port AppBar to Scrollable2 (#7996)

Move the back button and drawer opening logic into the app bar.

Move the tap-status-bar-to-scroll-to-top logic to using
ScrollControllers. Provide a PrimaryScrollController and a `primary`
flag on scroll views.

Make it possible to track when a route becomes or stops being poppable.
This commit is contained in:
Ian Hickson
2017-02-08 18:16:19 -08:00
committed by GitHub
parent 8838a8fbfa
commit 83a4cf269f
26 changed files with 1329 additions and 1086 deletions

View File

@@ -21,11 +21,12 @@ void main() {
// Scroll the Buttons demo into view so that a tap will succeed
final Point allDemosOrigin = tester.getTopRight(find.text('Demos'));
final Point buttonsDemoOrigin = tester.getTopRight(find.text('Buttons'));
final double scrollDelta = buttonsDemoOrigin.y - allDemosOrigin.y;
await tester.scrollAt(allDemosOrigin, new Offset(0.0, -scrollDelta));
await tester.pump(); // start the scroll
await tester.pump(const Duration(seconds: 1));
final Finder button = find.text('Buttons');
while (button.evaluate().isEmpty) {
await tester.scrollAt(allDemosOrigin, new Offset(0.0, -100.0));
await tester.pump(); // start the scroll
await tester.pump(const Duration(seconds: 1));
}
// Launch the buttons demo and then prove that showing the example
// code dialog does not crash.