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
4df55087
Unverified
Commit
4df55087
authored
Jan 10, 2022
by
Markus Aksli
Committed by
GitHub
Jan 10, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
InkResponse enable if onTapDown is not null (#96224)
parent
56a7c97f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
1 deletion
+21
-1
ink_well.dart
packages/flutter/lib/src/material/ink_well.dart
+1
-1
ink_well_test.dart
packages/flutter/test/material/ink_well_test.dart
+20
-0
No files found.
packages/flutter/lib/src/material/ink_well.dart
View file @
4df55087
...
...
@@ -1032,7 +1032,7 @@ class _InkResponseState extends State<_InkResponseStateWidget>
}
bool
_isWidgetEnabled
(
_InkResponseStateWidget
widget
)
{
return
widget
.
onTap
!=
null
||
widget
.
onDoubleTap
!=
null
||
widget
.
onLongPress
!=
null
;
return
widget
.
onTap
!=
null
||
widget
.
onDoubleTap
!=
null
||
widget
.
onLongPress
!=
null
||
widget
.
onTapDown
!=
null
;
}
bool
get
enabled
=>
_isWidgetEnabled
(
widget
);
...
...
packages/flutter/test/material/ink_well_test.dart
View file @
4df55087
...
...
@@ -76,6 +76,26 @@ void main() {
expect
(
log
,
equals
(<
String
>[
'tap-down'
,
'tap-cancel'
]));
});
testWidgets
(
'InkWell only onTapDown enables gestures'
,
(
WidgetTester
tester
)
async
{
// Regression test for https://github.com/flutter/flutter/issues/96030
bool
downTapped
=
false
;
await
tester
.
pumpWidget
(
Directionality
(
textDirection:
TextDirection
.
ltr
,
child:
Material
(
child:
Center
(
child:
InkWell
(
onTapDown:
(
TapDownDetails
details
)
{
downTapped
=
true
;
},
),
),
),
));
await
tester
.
tap
(
find
.
byType
(
InkWell
));
expect
(
downTapped
,
true
);
});
testWidgets
(
'InkWell invokes activation actions when expected'
,
(
WidgetTester
tester
)
async
{
final
List
<
String
>
log
=
<
String
>[];
...
...
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