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
03e89392
Commit
03e89392
authored
Dec 09, 2015
by
Hans Muller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix PageableList demo
parent
37f685b4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
15 deletions
+11
-15
pageable_list.dart
packages/flutter/lib/src/widgets/pageable_list.dart
+11
-3
scrollable.dart
packages/flutter/lib/src/widgets/scrollable.dart
+0
-12
No files found.
packages/flutter/lib/src/widgets/pageable_list.dart
View file @
03e89392
...
...
@@ -131,11 +131,19 @@ class PageableListState<T, Config extends PageableList<T>> extends ScrollableSta
);
}
ScrollBehavior
createScrollBehavior
()
{
return
config
.
itemsWrap
?
new
UnboundedBehavior
()
:
new
OverscrollBehavior
();
UnboundedBehavior
_unboundedBehavior
;
OverscrollBehavior
_overscrollBehavior
;
ExtentScrollBehavior
get
scrollBehavior
{
if
(
config
.
itemsWrap
)
{
_unboundedBehavior
??=
new
UnboundedBehavior
();
return
_unboundedBehavior
;
}
_overscrollBehavior
??=
new
OverscrollBehavior
();
return
_overscrollBehavior
;
}
ExtentScrollBehavior
get
scrollBehavior
=>
super
.
scrollBehavior
;
ScrollBehavior
createScrollBehavior
()
=>
scrollBehavior
;
bool
get
snapScrollOffsetChanges
=>
config
.
itemsSnapAlignment
==
ItemsSnapAlignment
.
item
;
...
...
packages/flutter/lib/src/widgets/scrollable.dart
View file @
03e89392
...
...
@@ -197,18 +197,6 @@ abstract class ScrollableState<T extends Scrollable> extends State<T> {
}
Simulation
_createFlingSimulation
(
double
velocity
)
{
/*
// Assume that we're rendering at atleast 15 FPS. Stop when we're
// scrolling less than one logical pixel per frame. We're essentially
// normalizing by the devicePixelRatio so that the threshold has the
// same effect independent of the device's pixel density.
double endVelocity = pixelToScrollOffset(15.0 * ui.window.devicePixelRatio);
// Similar to endVelocity. Stop scrolling when we're this close to
// destiniation scroll offset.
double endDistance = pixelToScrollOffset(0.5 * ui.window.devicePixelRatio);
*/
final
double
endVelocity
=
pixelToScrollOffset
(
kPixelScrollTolerance
.
velocity
);
final
double
endDistance
=
pixelToScrollOffset
(
kPixelScrollTolerance
.
distance
);
return
scrollBehavior
.
createFlingScrollSimulation
(
scrollOffset
,
velocity
)
...
...
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