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
8916b101
Commit
8916b101
authored
Mar 02, 2017
by
Chris Bracken
Committed by
GitHub
Mar 02, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid potential ConcurrentModificationError (#8534)
Also make locals final where possible. Followup to
52715467
.
parent
0421b4f3
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
9 deletions
+9
-9
scroll_controller.dart
packages/flutter/lib/src/widgets/scroll_controller.dart
+3
-3
scroll_view.dart
packages/flutter/lib/src/widgets/scroll_view.dart
+4
-4
single_child_scroll_view.dart
...ges/flutter/lib/src/widgets/single_child_scroll_view.dart
+2
-2
No files found.
packages/flutter/lib/src/widgets/scroll_controller.dart
View file @
8916b101
...
...
@@ -70,7 +70,7 @@ class ScrollController {
@required
Curve
curve
,
})
{
assert
(
_positions
.
isNotEmpty
,
'ScrollController not attached to any scroll views.'
);
List
<
Future
<
Null
>>
animations
=
new
List
<
Future
<
Null
>>(
_positions
.
length
);
final
List
<
Future
<
Null
>>
animations
=
new
List
<
Future
<
Null
>>(
_positions
.
length
);
for
(
int
i
=
0
;
i
<
_positions
.
length
;
i
++)
animations
[
i
]
=
_positions
[
i
].
animateTo
(
offset
,
duration:
duration
,
curve:
curve
);
return
Future
.
wait
<
Null
>(
animations
).
then
((
List
<
Null
>
_
)
=>
null
);
...
...
@@ -90,8 +90,8 @@ class ScrollController {
/// value was out of range.
void
jumpTo
(
double
value
)
{
assert
(
_positions
.
isNotEmpty
,
'ScrollController not attached to any scroll views.'
);
for
(
ScrollPosition
p
in
_positions
)
p
.
jumpTo
(
value
);
for
(
ScrollPosition
p
osition
in
new
List
<
ScrollPosition
>.
from
(
_positions
)
)
p
osition
.
jumpTo
(
value
);
}
/// Register the given position with this controller.
...
...
packages/flutter/lib/src/widgets/scroll_view.dart
View file @
8916b101
...
...
@@ -72,13 +72,13 @@ abstract class ScrollView extends StatelessWidget {
@override
Widget
build
(
BuildContext
context
)
{
List
<
Widget
>
slivers
=
buildSlivers
(
context
);
AxisDirection
axisDirection
=
getDirection
(
context
);
final
List
<
Widget
>
slivers
=
buildSlivers
(
context
);
final
AxisDirection
axisDirection
=
getDirection
(
context
);
ScrollController
scrollController
=
primary
final
ScrollController
scrollController
=
primary
?
PrimaryScrollController
.
of
(
context
)
:
controller
;
Scrollable
scrollable
=
new
Scrollable
(
final
Scrollable
scrollable
=
new
Scrollable
(
axisDirection:
axisDirection
,
controller:
scrollController
,
physics:
physics
,
...
...
packages/flutter/lib/src/widgets/single_child_scroll_view.dart
View file @
8916b101
...
...
@@ -96,10 +96,10 @@ class SingleChildScrollView extends StatelessWidget {
Widget
contents
=
child
;
if
(
padding
!=
null
)
contents
=
new
Padding
(
padding:
padding
,
child:
contents
);
ScrollController
scrollController
=
primary
final
ScrollController
scrollController
=
primary
?
PrimaryScrollController
.
of
(
context
)
:
controller
;
Scrollable
scrollable
=
new
Scrollable
(
final
Scrollable
scrollable
=
new
Scrollable
(
axisDirection:
axisDirection
,
controller:
scrollController
,
physics:
physics
,
...
...
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