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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user