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
e36e9ca0
Unverified
Commit
e36e9ca0
authored
Aug 26, 2022
by
Jonah Williams
Committed by
GitHub
Aug 26, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nest list views for bad scroll (#110373)
parent
056f1106
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
16 deletions
+18
-16
app.dart
dev/benchmarks/complex_layout/lib/src/app.dart
+18
-16
No files found.
dev/benchmarks/complex_layout/lib/src/app.dart
View file @
e36e9ca0
...
...
@@ -90,7 +90,23 @@ class ComplexLayout extends StatefulWidget {
class
ComplexLayoutState
extends
State
<
ComplexLayout
>
{
@override
Widget
build
(
BuildContext
context
)
{
print
(
widget
.
badScroll
);
Widget
body
=
ListView
.
builder
(
key:
const
Key
(
'complex-scroll'
),
// this key is used by the driver test
controller:
ScrollController
(),
// So that the scroll offset can be tracked
itemCount:
widget
.
badScroll
?
500
:
null
,
shrinkWrap:
widget
.
badScroll
,
itemBuilder:
(
BuildContext
context
,
int
index
)
{
if
(
index
.
isEven
)
{
return
FancyImageItem
(
index
,
key:
PageStorageKey
<
int
>(
index
));
}
else
{
return
FancyGalleryItem
(
index
,
key:
PageStorageKey
<
int
>(
index
));
}
},
);
if
(
widget
.
badScroll
)
{
body
=
ListView
(
children:
<
Widget
>[
body
]);
}
return
Scaffold
(
appBar:
AppBar
(
title:
const
Text
(
'Advanced Layout'
),
...
...
@@ -107,21 +123,7 @@ class ComplexLayoutState extends State<ComplexLayout> {
),
body:
Column
(
children:
<
Widget
>[
Expanded
(
child:
ListView
.
builder
(
key:
const
Key
(
'complex-scroll'
),
// this key is used by the driver test
controller:
ScrollController
(),
// So that the scroll offset can be tracked
itemCount:
widget
.
badScroll
?
500
:
null
,
shrinkWrap:
widget
.
badScroll
,
itemBuilder:
(
BuildContext
context
,
int
index
)
{
if
(
index
.
isEven
)
{
return
FancyImageItem
(
index
,
key:
PageStorageKey
<
int
>(
index
));
}
else
{
return
FancyGalleryItem
(
index
,
key:
PageStorageKey
<
int
>(
index
));
}
},
),
),
Expanded
(
child:
body
),
const
BottomBar
(),
],
),
...
...
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