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
7ebb6412
Commit
7ebb6412
authored
Dec 14, 2015
by
Hans Muller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Only set tolerance if simulation is non-null
parent
640c609f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
scrollable.dart
packages/flutter/lib/src/widgets/scrollable.dart
+7
-4
No files found.
packages/flutter/lib/src/widgets/scrollable.dart
View file @
7ebb6412
...
...
@@ -197,10 +197,13 @@ abstract class ScrollableState<T extends Scrollable> extends State<T> {
}
Simulation
_createFlingSimulation
(
double
velocity
)
{
final
double
endVelocity
=
pixelToScrollOffset
(
kPixelScrollTolerance
.
velocity
);
final
double
endDistance
=
pixelToScrollOffset
(
kPixelScrollTolerance
.
distance
);
return
scrollBehavior
.
createFlingScrollSimulation
(
scrollOffset
,
velocity
)
..
tolerance
=
new
Tolerance
(
velocity:
endVelocity
.
abs
(),
distance:
endDistance
);
final
Simulation
simulation
=
scrollBehavior
.
createFlingScrollSimulation
(
scrollOffset
,
velocity
);
if
(
simulation
!=
null
)
{
final
double
endVelocity
=
pixelToScrollOffset
(
kPixelScrollTolerance
.
velocity
);
final
double
endDistance
=
pixelToScrollOffset
(
kPixelScrollTolerance
.
distance
);
simulation
.
tolerance
=
new
Tolerance
(
velocity:
endVelocity
.
abs
(),
distance:
endDistance
);
}
return
simulation
;
}
double
snapScrollOffset
(
double
value
)
{
...
...
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