This repository was archived by the owner on Feb 22, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +21
-1
lines changed Expand file tree Collapse file tree 2 files changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -1032,7 +1032,7 @@ class _InkResponseState extends State<_InkResponseStateWidget>
10321032 }
10331033
10341034 bool _isWidgetEnabled (_InkResponseStateWidget widget) {
1035- return widget.onTap != null || widget.onDoubleTap != null || widget.onLongPress != null ;
1035+ return widget.onTap != null || widget.onDoubleTap != null || widget.onLongPress != null || widget.onTapDown != null ;
10361036 }
10371037
10381038 bool get enabled => _isWidgetEnabled (widget);
Original file line number Diff line number Diff line change @@ -76,6 +76,26 @@ void main() {
7676 expect (log, equals (< String > ['tap-down' , 'tap-cancel' ]));
7777 });
7878
79+ testWidgets ('InkWell only onTapDown enables gestures' , (WidgetTester tester) async {
80+ // Regression test for https://github.com/flutter/flutter/issues/96030
81+ bool downTapped = false ;
82+ await tester.pumpWidget (Directionality (
83+ textDirection: TextDirection .ltr,
84+ child: Material (
85+ child: Center (
86+ child: InkWell (
87+ onTapDown: (TapDownDetails details) {
88+ downTapped = true ;
89+ },
90+ ),
91+ ),
92+ ),
93+ ));
94+
95+ await tester.tap (find.byType (InkWell ));
96+ expect (downTapped, true );
97+ });
98+
7999 testWidgets ('InkWell invokes activation actions when expected' , (WidgetTester tester) async {
80100 final List <String > log = < String > [];
81101
You can’t perform that action at this time.
0 commit comments