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
4bed7675
Unverified
Commit
4bed7675
authored
May 07, 2022
by
xubaolin
Committed by
GitHub
May 07, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix a `_WrappedScrollBehavior.shouldNotify` bug (#103267)
parent
c6ced845
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
scroll_configuration.dart
packages/flutter/lib/src/widgets/scroll_configuration.dart
+1
-1
scroll_behavior_test.dart
packages/flutter/test/widgets/scroll_behavior_test.dart
+8
-0
No files found.
packages/flutter/lib/src/widgets/scroll_configuration.dart
View file @
4bed7675
...
@@ -348,7 +348,7 @@ class _WrappedScrollBehavior implements ScrollBehavior {
...
@@ -348,7 +348,7 @@ class _WrappedScrollBehavior implements ScrollBehavior {
||
oldDelegate
.
overscroll
!=
overscroll
||
oldDelegate
.
overscroll
!=
overscroll
||
oldDelegate
.
physics
!=
physics
||
oldDelegate
.
physics
!=
physics
||
oldDelegate
.
platform
!=
platform
||
oldDelegate
.
platform
!=
platform
||
setEquals
<
PointerDeviceKind
>(
oldDelegate
.
dragDevices
,
dragDevices
)
||
!
setEquals
<
PointerDeviceKind
>(
oldDelegate
.
dragDevices
,
dragDevices
)
||
delegate
.
shouldNotify
(
oldDelegate
.
delegate
);
||
delegate
.
shouldNotify
(
oldDelegate
.
delegate
);
}
}
...
...
packages/flutter/test/widgets/scroll_behavior_test.dart
View file @
4bed7675
...
@@ -32,6 +32,14 @@ class TestScrollBehavior extends ScrollBehavior {
...
@@ -32,6 +32,14 @@ class TestScrollBehavior extends ScrollBehavior {
}
}
void
main
(
)
{
void
main
(
)
{
// Regression test for https://github.com/flutter/flutter/issues/89681
testWidgets
(
'_WrappedScrollBehavior shouldNotify test'
,
(
WidgetTester
tester
)
async
{
final
ScrollBehavior
behavior1
=
const
ScrollBehavior
().
copyWith
();
final
ScrollBehavior
behavior2
=
const
ScrollBehavior
().
copyWith
();
expect
(
behavior1
.
shouldNotify
(
behavior2
),
false
);
});
testWidgets
(
'Inherited ScrollConfiguration changed'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'Inherited ScrollConfiguration changed'
,
(
WidgetTester
tester
)
async
{
final
GlobalKey
key
=
GlobalKey
(
debugLabel:
'scrollable'
);
final
GlobalKey
key
=
GlobalKey
(
debugLabel:
'scrollable'
);
TestScrollBehavior
?
behavior
;
TestScrollBehavior
?
behavior
;
...
...
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