mirror of
https://github.com/flutter/flutter
synced 2024-10-13 19:52:53 +00:00
Restore Flutter gallery license page scrolling (#5934)
This commit is contained in:
parent
278711d5b1
commit
aa9aaf2eb7
|
@ -20,6 +20,11 @@ the [Flutter Setup](https://flutter.io/setup/) guide.
|
|||
|
||||
The `flutter run --release` command both builds and installs the Flutter app.
|
||||
|
||||
## Prerelease checklist
|
||||
|
||||
* Verify that the About box's license page scrolls and reveals its long
|
||||
long stream of license texts.
|
||||
|
||||
## Icon
|
||||
|
||||
Android launcher icons were generated using Android Asset Studio:
|
||||
|
|
|
@ -272,6 +272,7 @@ class LazyBlock extends StatelessWidget {
|
|||
minScrollOffset: minScrollOffset,
|
||||
scrollOffset: state.scrollOffset
|
||||
));
|
||||
state.updateGestureDetector();
|
||||
},
|
||||
delegate: delegate
|
||||
);
|
||||
|
|
|
@ -53,7 +53,7 @@ void main() {
|
|||
});
|
||||
|
||||
|
||||
testWidgets('Underflowing LazyBlock contentExtent should track additional children ', (WidgetTester tester) async {
|
||||
testWidgets('Underflowing LazyBlock contentExtent should track additional children', (WidgetTester tester) async {
|
||||
await tester.pumpWidget(new LazyBlock(
|
||||
delegate: new LazyBlockChildren(
|
||||
children: <Widget>[
|
||||
|
@ -155,4 +155,37 @@ void main() {
|
|||
expect(scrollBehavior.contentExtent, equals(700.0));
|
||||
});
|
||||
|
||||
testWidgets('Overflowing LazyBlock should become scrollable', (WidgetTester tester) async {
|
||||
// Regression test for https://github.com/flutter/flutter/issues/5920
|
||||
// When a LazyBlock's viewport hasn't overflowed, scrolling is disabled.
|
||||
// When children are added that cause it to overflow, scrolling should
|
||||
// be enabled.
|
||||
|
||||
await tester.pumpWidget(new LazyBlock(
|
||||
delegate: new LazyBlockChildren(
|
||||
children: <Widget>[
|
||||
new SizedBox(height: 100.0, child: new Text('100')),
|
||||
]
|
||||
)
|
||||
));
|
||||
|
||||
StatefulElement statefulElement = tester.element(find.byType(Scrollable));
|
||||
ScrollableState scrollable = statefulElement.state;
|
||||
OverscrollWhenScrollableBehavior scrollBehavior = scrollable.scrollBehavior;
|
||||
expect(scrollBehavior.isScrollable, isFalse);
|
||||
|
||||
await tester.pumpWidget(new LazyBlock(
|
||||
delegate: new LazyBlockChildren(
|
||||
children: <Widget>[
|
||||
new SizedBox(height: 100.0, child: new Text('100')),
|
||||
new SizedBox(height: 200.0, child: new Text('200')),
|
||||
new SizedBox(height: 400.0, child: new Text('400')),
|
||||
]
|
||||
)
|
||||
));
|
||||
|
||||
expect(scrollBehavior.isScrollable, isTrue);
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue