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
ce83f4fb
Unverified
Commit
ce83f4fb
authored
Jan 09, 2018
by
Ian Hickson
Committed by
GitHub
Jan 09, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make updateUserScrollDirection protected (#13850)
parent
61a8132e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
3 deletions
+7
-3
scroll_position_with_single_context.dart
.../lib/src/widgets/scroll_position_with_single_context.dart
+1
-1
linked_scroll_view_test.dart
packages/flutter/test/widgets/linked_scroll_view_test.dart
+5
-1
slivers_appbar_floating_test.dart
...es/flutter/test/widgets/slivers_appbar_floating_test.dart
+1
-1
No files found.
packages/flutter/lib/src/widgets/scroll_position_with_single_context.dart
View file @
ce83f4fb
...
...
@@ -165,7 +165,7 @@ class ScrollPositionWithSingleContext extends ScrollPosition implements ScrollAc
/// Set [userScrollDirection] to the given value.
///
/// If this changes the value, then a [UserScrollNotification] is dispatched.
@
visibleForTesting
@
protected
void
updateUserScrollDirection
(
ScrollDirection
value
)
{
assert
(
value
!=
null
);
if
(
userScrollDirection
==
value
)
...
...
packages/flutter/test/widgets/linked_scroll_view_test.dart
View file @
ce83f4fb
...
...
@@ -178,6 +178,10 @@ class LinkedScrollPosition extends ScrollPositionWithSingleContext {
assert
(
localOverscroll
==
0.0
||
(
beforeOverscroll
==
0.0
&&
afterOverscroll
==
0.0
));
}
void
_userMoved
(
ScrollDirection
direction
)
{
updateUserScrollDirection
(
direction
);
}
LinkedScrollActivity
link
(
LinkedScrollPosition
driver
)
{
if
(
this
.
activity
is
!
LinkedScrollActivity
)
beginActivity
(
new
LinkedScrollActivity
(
this
));
...
...
@@ -239,7 +243,7 @@ class LinkedScrollActivity extends ScrollActivity {
if
(
driver
.
userScrollDirection
!=
commonDirection
)
commonDirection
=
ScrollDirection
.
idle
;
}
delegate
.
updateUserScrollDirection
(
commonDirection
);
delegate
.
_userMoved
(
commonDirection
);
return
delegate
.
setPixels
(
delegate
.
pixels
+
delta
);
}
...
...
packages/flutter/test/widgets/slivers_appbar_floating_test.dart
View file @
ce83f4fb
...
...
@@ -187,7 +187,7 @@ void main() {
verifyPaintPosition
(
key3
,
const
Offset
(
0.0
,
0.0
),
true
);
position
.
animateTo
(
bigHeight
+
delegate
.
maxExtent
*
1.9
,
curve:
Curves
.
linear
,
duration:
const
Duration
(
minutes:
1
));
position
.
updateUserScrollDirection
(
ScrollDirection
.
forward
);
position
.
updateUserScrollDirection
(
ScrollDirection
.
forward
);
// ignore: invalid_use_of_protected_member
await
tester
.
pumpAndSettle
(
const
Duration
(
milliseconds:
1000
));
verifyPaintPosition
(
key1
,
const
Offset
(
0.0
,
0.0
),
false
);
verifyPaintPosition
(
key2
,
const
Offset
(
0.0
,
0.0
),
true
);
...
...
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