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
81b70675
Commit
81b70675
authored
Jan 06, 2016
by
Adam Barth
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1082 from abarth/scrollable_crash
Fix assert in Stocks app
parents
c4faad11
d2a1389e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
12 deletions
+3
-12
scrollable_grid.dart
packages/flutter/lib/src/widgets/scrollable_grid.dart
+1
-1
scrollable_list.dart
packages/flutter/lib/src/widgets/scrollable_list.dart
+1
-1
virtual_viewport.dart
packages/flutter/lib/src/widgets/virtual_viewport.dart
+1
-10
No files found.
packages/flutter/lib/src/widgets/scrollable_grid.dart
View file @
81b70675
...
...
@@ -142,7 +142,7 @@ class _GridViewportElement extends VirtualViewportElement<GridViewport> {
_materializedChildBase
=
(
materializedRowBase
*
_specification
.
columnCount
).
clamp
(
0
,
renderObject
.
virtualChildCount
);
_materializedChildCount
=
(
materializedRowLimit
*
_specification
.
columnCount
).
clamp
(
0
,
renderObject
.
virtualChildCount
)
-
_materializedChildBase
;
_repaintOffsetBase
=
_specification
.
rowOffsets
[
materializedRowBase
];
_repaintOffsetLimit
=
_specification
.
rowOffsets
[
materializedRowLimit
];
_repaintOffsetLimit
=
_specification
.
rowOffsets
[
materializedRowLimit
]
-
containerExtent
;
super
.
layout
(
constraints
);
...
...
packages/flutter/lib/src/widgets/scrollable_list.dart
View file @
81b70675
...
...
@@ -170,7 +170,7 @@ class _ListViewportElement extends VirtualViewportElement<ListViewport> {
_materializedChildCount
=
materializedChildLimit
-
_materializedChildBase
;
_repaintOffsetBase
=
_materializedChildBase
*
widget
.
itemExtent
;
_repaintOffsetLimit
=
materializedChildLimit
*
widget
.
itemExtent
;
_repaintOffsetLimit
=
materializedChildLimit
*
widget
.
itemExtent
-
containerExtent
;
super
.
layout
(
constraints
);
...
...
packages/flutter/lib/src/widgets/virtual_viewport.dart
View file @
81b70675
...
...
@@ -69,15 +69,6 @@ abstract class VirtualViewportElement<T extends VirtualViewport> extends RenderO
}
}
double
get
_containerExtent
{
switch
(
widget
.
scrollDirection
)
{
case
ScrollDirection
.
vertical
:
return
renderObject
.
size
.
height
;
case
ScrollDirection
.
horizontal
:
return
renderObject
.
size
.
width
;
}
}
void
updateRenderObject
()
{
renderObject
.
virtualChildCount
=
widget
.
children
.
length
;
...
...
@@ -89,7 +80,7 @@ abstract class VirtualViewportElement<T extends VirtualViewport> extends RenderO
if
(!
renderObject
.
needsLayout
)
{
if
(
repaintOffsetBase
!=
null
&&
widget
.
startOffset
<
repaintOffsetBase
)
renderObject
.
markNeedsLayout
();
else
if
(
repaintOffsetLimit
!=
null
&&
widget
.
startOffset
+
_containerExtent
>
repaintOffsetLimit
)
else
if
(
repaintOffsetLimit
!=
null
&&
widget
.
startOffset
>
repaintOffsetLimit
)
renderObject
.
markNeedsLayout
();
}
}
...
...
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