Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
aa9aaf2e
Commit
aa9aaf2e
authored
Sep 20, 2016
by
Hans Muller
Committed by
GitHub
Sep 20, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Restore Flutter gallery license page scrolling (#5934)
parent
278711d5
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
1 deletion
+40
-1
README.md
examples/flutter_gallery/README.md
+5
-0
lazy_block.dart
packages/flutter/lib/src/widgets/lazy_block.dart
+1
-0
lazy_block_test.dart
packages/flutter/test/widget/lazy_block_test.dart
+34
-1
No files found.
examples/flutter_gallery/README.md
View file @
aa9aaf2e
...
...
@@ -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:
...
...
packages/flutter/lib/src/widgets/lazy_block.dart
View file @
aa9aaf2e
...
...
@@ -272,6 +272,7 @@ class LazyBlock extends StatelessWidget {
minScrollOffset:
minScrollOffset
,
scrollOffset:
state
.
scrollOffset
));
state
.
updateGestureDetector
();
},
delegate:
delegate
);
...
...
packages/flutter/test/widget/lazy_block_test.dart
View file @
aa9aaf2e
...
...
@@ -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
);
});
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment