minimum-touch-target

Path
lint/a11y/minimum-touch-target
Default
Off, opt in
Origin
Falcon
Domain
flutter
Rule
268 of 512
flutter

Warn about explicitly undersized Flutter touch targets.

SizedBox and Container are checked when their direct child is interactive. CupertinoButton needs 44 logical pixels; other supported targets need 48. Gestures without an active callback and explicitly disabled buttons are skipped. Dynamic dimensions, indirect constraints, and non-interactive children are not inferred.

Invalid

example.dartdart
import 'package:flutter/material.dart';
import 'package:flutter/material.dart' as f;

void targets() {
  SizedBox(width: 47, child: IconButton());
  SizedBox(height: 24.0, child: FloatingActionButton());
  f.Container(width: 0, child: GestureDetector(onTap: () {}));
  new SizedBox(width: 32, height: 32, child: InkWell(onTap: () {}));
  const SizedBox(height: (47.5), child: TextButton());
  Container(width: -1, child: ElevatedButton());
  SizedBox(width: 43, child: CupertinoButton(onPressed: () {}));
}

void callbacks(dynamic callback) {
  SizedBox(width: 1, child: IconButton(onPressed: callback));
  SizedBox(width: 1, child: IconButton.filled(onPressed: () {}));
  SizedBox(width: 1, child: FloatingActionButton.small(onPressed: (callback)));
  SizedBox(width: 1, child: TextButton(onPressed: null, onLongPress: () {}));
  SizedBox(width: 1, child: ElevatedButton(onPressed: (null), onLongPress: callback));
  SizedBox(width: 1, child: OutlinedButton(onPressed: () {}, onLongPress: null));
  SizedBox(width: 1, child: RawMaterialButton(onPressed: callback));
  SizedBox(width: 43, child: CupertinoButton(onPressed: (callback)));
  SizedBox(width: 43, child: CupertinoButton(onPressed: null, onLongPress: () {}));
  SizedBox(width: 1, child: TextButton(onLongPress: null));
  SizedBox(width: 1, child: GestureDetector(onTap: (callback)));
  SizedBox(width: 1, child: InkWell(onTap: null, onLongPress: () {}));
}

void additionalGestures(dynamic callback) {
  SizedBox(width: 1, child: GestureDetector(onSecondaryTapCancel: callback));
  SizedBox(width: 1, child: GestureDetector(onTertiaryTapCancel: callback));
  SizedBox(width: 1, child: GestureDetector(onLongPressCancel: callback));
  SizedBox(width: 1, child: GestureDetector(onSecondaryLongPressDown: callback));
  SizedBox(width: 1, child: GestureDetector(onSecondaryLongPressCancel: callback));
  SizedBox(width: 1, child: GestureDetector(onSecondaryLongPress: callback));
  SizedBox(width: 1, child: GestureDetector(onSecondaryLongPressStart: callback));
  SizedBox(width: 1, child: GestureDetector(onSecondaryLongPressMoveUpdate: callback));
  SizedBox(width: 1, child: GestureDetector(onSecondaryLongPressUp: callback));
  SizedBox(width: 1, child: GestureDetector(onSecondaryLongPressEnd: callback));
  SizedBox(width: 1, child: GestureDetector(onTertiaryLongPressDown: callback));
  SizedBox(width: 1, child: GestureDetector(onTertiaryLongPressCancel: callback));
  SizedBox(width: 1, child: GestureDetector(onTertiaryLongPress: callback));
  SizedBox(width: 1, child: GestureDetector(onTertiaryLongPressStart: callback));
  SizedBox(width: 1, child: GestureDetector(onTertiaryLongPressMoveUpdate: callback));
  SizedBox(width: 1, child: GestureDetector(onTertiaryLongPressUp: callback));
  SizedBox(width: 1, child: GestureDetector(onTertiaryLongPressEnd: callback));
  SizedBox(width: 1, child: GestureDetector(onVerticalDragDown: callback));
  SizedBox(width: 1, child: GestureDetector(onVerticalDragCancel: callback));
  SizedBox(width: 1, child: GestureDetector(onHorizontalDragDown: callback));
  SizedBox(width: 1, child: GestureDetector(onHorizontalDragCancel: callback));
  SizedBox(width: 1, child: GestureDetector(onForcePressStart: callback));
  SizedBox(width: 1, child: GestureDetector(onForcePressPeak: callback));
  SizedBox(width: 1, child: GestureDetector(onForcePressUpdate: callback));
  SizedBox(width: 1, child: GestureDetector(onForcePressEnd: callback));
  SizedBox(width: 1, child: GestureDetector(onPanCancel: callback));
  f.SizedBox(width: 1, child: f.GestureDetector(onTapMove: (_) {}, onTap: callback));
  SizedBox(width: 1, child: GestureDetector(onSecondaryLongPress: () {}));
  SizedBox(width: 1, child: InkWell(onSecondaryTapCancel: () {}, onSecondaryTapDown: callback));
  SizedBox(width: 1, child: InkResponse(onSecondaryTapCancel: (callback), onSecondaryTap: () {}));
}

void inkEnablingCallbacks(dynamic callback) {
  SizedBox(width: 1, child: InkWell(onTap: callback));
  SizedBox(width: 1, child: InkWell(onTapDown: callback));
  SizedBox(width: 1, child: InkWell(onTapUp: callback));
  SizedBox(width: 1, child: InkWell(onDoubleTap: callback));
  SizedBox(width: 1, child: InkWell(onLongPress: callback));
  SizedBox(width: 1, child: InkWell(onLongPressUp: callback));
  SizedBox(width: 1, child: InkWell(onSecondaryTap: callback));
  SizedBox(width: 1, child: InkWell(onSecondaryTapDown: callback));
  SizedBox(width: 1, child: InkWell(onSecondaryTapUp: callback));
  SizedBox(width: 1, child: InkResponse(onTap: callback));
  SizedBox(width: 1, child: InkResponse(onTapDown: callback));
  SizedBox(width: 1, child: InkResponse(onTapUp: callback));
  SizedBox(width: 1, child: InkResponse(onDoubleTap: callback));
  SizedBox(width: 1, child: InkResponse(onLongPress: callback));
  SizedBox(width: 1, child: InkResponse(onLongPressUp: callback));
  SizedBox(width: 1, child: InkResponse(onSecondaryTap: callback));
  SizedBox(width: 1, child: InkResponse(onSecondaryTapDown: callback));
  SizedBox(width: 1, child: InkResponse(onSecondaryTapUp: callback));
  SizedBox(width: 1, child: GestureDetector(onTapCancel: callback));
  SizedBox(width: 1, child: InkWell(onTapCancel: callback, onTap: () {}));
  SizedBox(width: 1, child: InkResponse(onTapCancel: () {}, onTapUp: callback));
}
Provide a touch target at least 48 logical pixels wide and high.
4void targets() {
5 SizedBox(width: 47, child: IconButton());
Provide a touch target at least 48 logical pixels wide and high.
5 SizedBox(width: 47, child: IconButton());
6 SizedBox(height: 24.0, child: FloatingActionButton());
Provide a touch target at least 48 logical pixels wide and high.
6 SizedBox(height: 24.0, child: FloatingActionButton());
7 f.Container(width: 0, child: GestureDetector(onTap: () {}));
Provide a touch target at least 48 logical pixels wide and high.
7 f.Container(width: 0, child: GestureDetector(onTap: () {}));
8 new SizedBox(width: 32, height: 32, child: InkWell(onTap: () {}));
Provide a touch target at least 48 logical pixels wide and high.
8 new SizedBox(width: 32, height: 32, child: InkWell(onTap: () {}));
9 const SizedBox(height: (47.5), child: TextButton());
Provide a touch target at least 48 logical pixels wide and high.
9 const SizedBox(height: (47.5), child: TextButton());
10 Container(width: -1, child: ElevatedButton());
Provide a touch target at least 44 logical pixels wide and high.
10 Container(width: -1, child: ElevatedButton());
11 SizedBox(width: 43, child: CupertinoButton(onPressed: () {}));
Provide a touch target at least 48 logical pixels wide and high.
14void callbacks(dynamic callback) {
15 SizedBox(width: 1, child: IconButton(onPressed: callback));
Provide a touch target at least 48 logical pixels wide and high.
15 SizedBox(width: 1, child: IconButton(onPressed: callback));
16 SizedBox(width: 1, child: IconButton.filled(onPressed: () {}));
Provide a touch target at least 48 logical pixels wide and high.
16 SizedBox(width: 1, child: IconButton.filled(onPressed: () {}));
17 SizedBox(width: 1, child: FloatingActionButton.small(onPressed: (callback)));
Provide a touch target at least 48 logical pixels wide and high.
17 SizedBox(width: 1, child: FloatingActionButton.small(onPressed: (callback)));
18 SizedBox(width: 1, child: TextButton(onPressed: null, onLongPress: () {}));
Provide a touch target at least 48 logical pixels wide and high.
18 SizedBox(width: 1, child: TextButton(onPressed: null, onLongPress: () {}));
19 SizedBox(width: 1, child: ElevatedButton(onPressed: (null), onLongPress: callback));
Provide a touch target at least 48 logical pixels wide and high.
19 SizedBox(width: 1, child: ElevatedButton(onPressed: (null), onLongPress: callback));
20 SizedBox(width: 1, child: OutlinedButton(onPressed: () {}, onLongPress: null));
Provide a touch target at least 48 logical pixels wide and high.
20 SizedBox(width: 1, child: OutlinedButton(onPressed: () {}, onLongPress: null));
21 SizedBox(width: 1, child: RawMaterialButton(onPressed: callback));
Provide a touch target at least 44 logical pixels wide and high.
21 SizedBox(width: 1, child: RawMaterialButton(onPressed: callback));
22 SizedBox(width: 43, child: CupertinoButton(onPressed: (callback)));
Provide a touch target at least 44 logical pixels wide and high.
22 SizedBox(width: 43, child: CupertinoButton(onPressed: (callback)));
23 SizedBox(width: 43, child: CupertinoButton(onPressed: null, onLongPress: () {}));
Provide a touch target at least 48 logical pixels wide and high.
23 SizedBox(width: 43, child: CupertinoButton(onPressed: null, onLongPress: () {}));
24 SizedBox(width: 1, child: TextButton(onLongPress: null));
Provide a touch target at least 48 logical pixels wide and high.
24 SizedBox(width: 1, child: TextButton(onLongPress: null));
25 SizedBox(width: 1, child: GestureDetector(onTap: (callback)));
Provide a touch target at least 48 logical pixels wide and high.
25 SizedBox(width: 1, child: GestureDetector(onTap: (callback)));
26 SizedBox(width: 1, child: InkWell(onTap: null, onLongPress: () {}));
Provide a touch target at least 48 logical pixels wide and high.
29void additionalGestures(dynamic callback) {
30 SizedBox(width: 1, child: GestureDetector(onSecondaryTapCancel: callback));
Provide a touch target at least 48 logical pixels wide and high.
30 SizedBox(width: 1, child: GestureDetector(onSecondaryTapCancel: callback));
31 SizedBox(width: 1, child: GestureDetector(onTertiaryTapCancel: callback));
Provide a touch target at least 48 logical pixels wide and high.
31 SizedBox(width: 1, child: GestureDetector(onTertiaryTapCancel: callback));
32 SizedBox(width: 1, child: GestureDetector(onLongPressCancel: callback));
Provide a touch target at least 48 logical pixels wide and high.
32 SizedBox(width: 1, child: GestureDetector(onLongPressCancel: callback));
33 SizedBox(width: 1, child: GestureDetector(onSecondaryLongPressDown: callback));
Provide a touch target at least 48 logical pixels wide and high.
33 SizedBox(width: 1, child: GestureDetector(onSecondaryLongPressDown: callback));
34 SizedBox(width: 1, child: GestureDetector(onSecondaryLongPressCancel: callback));
Provide a touch target at least 48 logical pixels wide and high.
34 SizedBox(width: 1, child: GestureDetector(onSecondaryLongPressCancel: callback));
35 SizedBox(width: 1, child: GestureDetector(onSecondaryLongPress: callback));
Provide a touch target at least 48 logical pixels wide and high.
35 SizedBox(width: 1, child: GestureDetector(onSecondaryLongPress: callback));
36 SizedBox(width: 1, child: GestureDetector(onSecondaryLongPressStart: callback));
Provide a touch target at least 48 logical pixels wide and high.
36 SizedBox(width: 1, child: GestureDetector(onSecondaryLongPressStart: callback));
37 SizedBox(width: 1, child: GestureDetector(onSecondaryLongPressMoveUpdate: callback));
Provide a touch target at least 48 logical pixels wide and high.
37 SizedBox(width: 1, child: GestureDetector(onSecondaryLongPressMoveUpdate: callback));
38 SizedBox(width: 1, child: GestureDetector(onSecondaryLongPressUp: callback));
Provide a touch target at least 48 logical pixels wide and high.
38 SizedBox(width: 1, child: GestureDetector(onSecondaryLongPressUp: callback));
39 SizedBox(width: 1, child: GestureDetector(onSecondaryLongPressEnd: callback));
Provide a touch target at least 48 logical pixels wide and high.
39 SizedBox(width: 1, child: GestureDetector(onSecondaryLongPressEnd: callback));
40 SizedBox(width: 1, child: GestureDetector(onTertiaryLongPressDown: callback));
Provide a touch target at least 48 logical pixels wide and high.
40 SizedBox(width: 1, child: GestureDetector(onTertiaryLongPressDown: callback));
41 SizedBox(width: 1, child: GestureDetector(onTertiaryLongPressCancel: callback));
Provide a touch target at least 48 logical pixels wide and high.
41 SizedBox(width: 1, child: GestureDetector(onTertiaryLongPressCancel: callback));
42 SizedBox(width: 1, child: GestureDetector(onTertiaryLongPress: callback));
Provide a touch target at least 48 logical pixels wide and high.
42 SizedBox(width: 1, child: GestureDetector(onTertiaryLongPress: callback));
43 SizedBox(width: 1, child: GestureDetector(onTertiaryLongPressStart: callback));
Provide a touch target at least 48 logical pixels wide and high.
43 SizedBox(width: 1, child: GestureDetector(onTertiaryLongPressStart: callback));
44 SizedBox(width: 1, child: GestureDetector(onTertiaryLongPressMoveUpdate: callback));
Provide a touch target at least 48 logical pixels wide and high.
44 SizedBox(width: 1, child: GestureDetector(onTertiaryLongPressMoveUpdate: callback));
45 SizedBox(width: 1, child: GestureDetector(onTertiaryLongPressUp: callback));
Provide a touch target at least 48 logical pixels wide and high.
45 SizedBox(width: 1, child: GestureDetector(onTertiaryLongPressUp: callback));
46 SizedBox(width: 1, child: GestureDetector(onTertiaryLongPressEnd: callback));
Provide a touch target at least 48 logical pixels wide and high.
46 SizedBox(width: 1, child: GestureDetector(onTertiaryLongPressEnd: callback));
47 SizedBox(width: 1, child: GestureDetector(onVerticalDragDown: callback));
Provide a touch target at least 48 logical pixels wide and high.
47 SizedBox(width: 1, child: GestureDetector(onVerticalDragDown: callback));
48 SizedBox(width: 1, child: GestureDetector(onVerticalDragCancel: callback));
Provide a touch target at least 48 logical pixels wide and high.
48 SizedBox(width: 1, child: GestureDetector(onVerticalDragCancel: callback));
49 SizedBox(width: 1, child: GestureDetector(onHorizontalDragDown: callback));
Provide a touch target at least 48 logical pixels wide and high.
49 SizedBox(width: 1, child: GestureDetector(onHorizontalDragDown: callback));
50 SizedBox(width: 1, child: GestureDetector(onHorizontalDragCancel: callback));
Provide a touch target at least 48 logical pixels wide and high.
50 SizedBox(width: 1, child: GestureDetector(onHorizontalDragCancel: callback));
51 SizedBox(width: 1, child: GestureDetector(onForcePressStart: callback));
Provide a touch target at least 48 logical pixels wide and high.
51 SizedBox(width: 1, child: GestureDetector(onForcePressStart: callback));
52 SizedBox(width: 1, child: GestureDetector(onForcePressPeak: callback));
Provide a touch target at least 48 logical pixels wide and high.
52 SizedBox(width: 1, child: GestureDetector(onForcePressPeak: callback));
53 SizedBox(width: 1, child: GestureDetector(onForcePressUpdate: callback));
Provide a touch target at least 48 logical pixels wide and high.
53 SizedBox(width: 1, child: GestureDetector(onForcePressUpdate: callback));
54 SizedBox(width: 1, child: GestureDetector(onForcePressEnd: callback));
Provide a touch target at least 48 logical pixels wide and high.
54 SizedBox(width: 1, child: GestureDetector(onForcePressEnd: callback));
55 SizedBox(width: 1, child: GestureDetector(onPanCancel: callback));
Provide a touch target at least 48 logical pixels wide and high.
55 SizedBox(width: 1, child: GestureDetector(onPanCancel: callback));
56 f.SizedBox(width: 1, child: f.GestureDetector(onTapMove: (_) {}, onTap: callback));
Provide a touch target at least 48 logical pixels wide and high.
56 f.SizedBox(width: 1, child: f.GestureDetector(onTapMove: (_) {}, onTap: callback));
57 SizedBox(width: 1, child: GestureDetector(onSecondaryLongPress: () {}));
Provide a touch target at least 48 logical pixels wide and high.
57 SizedBox(width: 1, child: GestureDetector(onSecondaryLongPress: () {}));
58 SizedBox(width: 1, child: InkWell(onSecondaryTapCancel: () {}, onSecondaryTapDown: callback));
Provide a touch target at least 48 logical pixels wide and high.
58 SizedBox(width: 1, child: InkWell(onSecondaryTapCancel: () {}, onSecondaryTapDown: callback));
59 SizedBox(width: 1, child: InkResponse(onSecondaryTapCancel: (callback), onSecondaryTap: () {}));
Provide a touch target at least 48 logical pixels wide and high.
62void inkEnablingCallbacks(dynamic callback) {
63 SizedBox(width: 1, child: InkWell(onTap: callback));
Provide a touch target at least 48 logical pixels wide and high.
63 SizedBox(width: 1, child: InkWell(onTap: callback));
64 SizedBox(width: 1, child: InkWell(onTapDown: callback));
Provide a touch target at least 48 logical pixels wide and high.
64 SizedBox(width: 1, child: InkWell(onTapDown: callback));
65 SizedBox(width: 1, child: InkWell(onTapUp: callback));
Provide a touch target at least 48 logical pixels wide and high.
65 SizedBox(width: 1, child: InkWell(onTapUp: callback));
66 SizedBox(width: 1, child: InkWell(onDoubleTap: callback));
Provide a touch target at least 48 logical pixels wide and high.
66 SizedBox(width: 1, child: InkWell(onDoubleTap: callback));
67 SizedBox(width: 1, child: InkWell(onLongPress: callback));
Provide a touch target at least 48 logical pixels wide and high.
67 SizedBox(width: 1, child: InkWell(onLongPress: callback));
68 SizedBox(width: 1, child: InkWell(onLongPressUp: callback));
Provide a touch target at least 48 logical pixels wide and high.
68 SizedBox(width: 1, child: InkWell(onLongPressUp: callback));
69 SizedBox(width: 1, child: InkWell(onSecondaryTap: callback));
Provide a touch target at least 48 logical pixels wide and high.
69 SizedBox(width: 1, child: InkWell(onSecondaryTap: callback));
70 SizedBox(width: 1, child: InkWell(onSecondaryTapDown: callback));
Provide a touch target at least 48 logical pixels wide and high.
70 SizedBox(width: 1, child: InkWell(onSecondaryTapDown: callback));
71 SizedBox(width: 1, child: InkWell(onSecondaryTapUp: callback));
Provide a touch target at least 48 logical pixels wide and high.
71 SizedBox(width: 1, child: InkWell(onSecondaryTapUp: callback));
72 SizedBox(width: 1, child: InkResponse(onTap: callback));
Provide a touch target at least 48 logical pixels wide and high.
72 SizedBox(width: 1, child: InkResponse(onTap: callback));
73 SizedBox(width: 1, child: InkResponse(onTapDown: callback));
Provide a touch target at least 48 logical pixels wide and high.
73 SizedBox(width: 1, child: InkResponse(onTapDown: callback));
74 SizedBox(width: 1, child: InkResponse(onTapUp: callback));
Provide a touch target at least 48 logical pixels wide and high.
74 SizedBox(width: 1, child: InkResponse(onTapUp: callback));
75 SizedBox(width: 1, child: InkResponse(onDoubleTap: callback));
Provide a touch target at least 48 logical pixels wide and high.
75 SizedBox(width: 1, child: InkResponse(onDoubleTap: callback));
76 SizedBox(width: 1, child: InkResponse(onLongPress: callback));
Provide a touch target at least 48 logical pixels wide and high.
76 SizedBox(width: 1, child: InkResponse(onLongPress: callback));
77 SizedBox(width: 1, child: InkResponse(onLongPressUp: callback));
Provide a touch target at least 48 logical pixels wide and high.
77 SizedBox(width: 1, child: InkResponse(onLongPressUp: callback));
78 SizedBox(width: 1, child: InkResponse(onSecondaryTap: callback));
Provide a touch target at least 48 logical pixels wide and high.
78 SizedBox(width: 1, child: InkResponse(onSecondaryTap: callback));
79 SizedBox(width: 1, child: InkResponse(onSecondaryTapDown: callback));
Provide a touch target at least 48 logical pixels wide and high.
79 SizedBox(width: 1, child: InkResponse(onSecondaryTapDown: callback));
80 SizedBox(width: 1, child: InkResponse(onSecondaryTapUp: callback));
Provide a touch target at least 48 logical pixels wide and high.
80 SizedBox(width: 1, child: InkResponse(onSecondaryTapUp: callback));
81 SizedBox(width: 1, child: GestureDetector(onTapCancel: callback));
Provide a touch target at least 48 logical pixels wide and high.
81 SizedBox(width: 1, child: GestureDetector(onTapCancel: callback));
82 SizedBox(width: 1, child: InkWell(onTapCancel: callback, onTap: () {}));
Provide a touch target at least 48 logical pixels wide and high.
82 SizedBox(width: 1, child: InkWell(onTapCancel: callback, onTap: () {}));
83 SizedBox(width: 1, child: InkResponse(onTapCancel: () {}, onTapUp: callback));

Valid

example.dartdart
import 'package:flutter/material.dart';
import 'package:flutter/material.dart' as f;

void targets(double size) {
  SizedBox(width: 48, height: 48, child: IconButton());
  Container(width: 60, child: GestureDetector(onTap: () {}));
  SizedBox(width: size, child: InkWell());
  SizedBox(width: 16, child: Text('Decoration'));
  SizedBox(child: FloatingActionButton());
  IconButton();
  SizedBox(width: 16);
  SizedBox(width: 44, height: 44, child: CupertinoButton(onPressed: () {}));
  SizedBox(width: 1, child: GestureDetector());
  SizedBox(width: 1, child: InkWell(onTap: null));
  SizedBox(width: 1, child: InkResponse());
  SizedBox(width: 1, child: IconButton(onPressed: null));
  f.Container(height: 1, child: f.IconButton.filled(onPressed: (null)));
  SizedBox(width: 1, child: FloatingActionButton(onPressed: null));
  SizedBox(width: 1, child: FloatingActionButton.small(onPressed: (null)));
  SizedBox(width: 1, child: TextButton(onPressed: null));
  SizedBox(width: 1, child: ElevatedButton(onPressed: (null), onLongPress: null));
  SizedBox(width: 1, child: OutlinedButton(onPressed: null, onLongPress: (null)));
  SizedBox(width: 1, child: RawMaterialButton(onPressed: null));
  SizedBox(width: 1, child: CupertinoButton(onPressed: ((null))));
}
void shadow(dynamic SizedBox) { SizedBox(width: 1, child: IconButton()); }

void inactiveAdditionalGestures() {
  SizedBox(width: 1, child: GestureDetector(onTapMove: (null)));
  SizedBox(width: 1, child: GestureDetector(onSecondaryTapCancel: null));
  SizedBox(width: 1, child: GestureDetector(onTertiaryTapCancel: null));
  SizedBox(width: 1, child: GestureDetector(onLongPressCancel: null));
  SizedBox(width: 1, child: GestureDetector(onSecondaryLongPressDown: null));
  SizedBox(width: 1, child: GestureDetector(onSecondaryLongPressCancel: null));
  SizedBox(width: 1, child: GestureDetector(onSecondaryLongPress: ((null))));
  SizedBox(width: 1, child: GestureDetector(onSecondaryLongPressStart: null));
  SizedBox(width: 1, child: GestureDetector(onSecondaryLongPressMoveUpdate: null));
  SizedBox(width: 1, child: GestureDetector(onSecondaryLongPressUp: null));
  SizedBox(width: 1, child: GestureDetector(onSecondaryLongPressEnd: null));
  SizedBox(width: 1, child: GestureDetector(onTertiaryLongPressDown: null));
  SizedBox(width: 1, child: GestureDetector(onTertiaryLongPressCancel: null));
  SizedBox(width: 1, child: GestureDetector(onTertiaryLongPress: null));
  SizedBox(width: 1, child: GestureDetector(onTertiaryLongPressStart: null));
  SizedBox(width: 1, child: GestureDetector(onTertiaryLongPressMoveUpdate: null));
  SizedBox(width: 1, child: GestureDetector(onTertiaryLongPressUp: null));
  SizedBox(width: 1, child: GestureDetector(onTertiaryLongPressEnd: null));
  SizedBox(width: 1, child: GestureDetector(onVerticalDragDown: null));
  SizedBox(width: 1, child: GestureDetector(onVerticalDragCancel: null));
  SizedBox(width: 1, child: GestureDetector(onHorizontalDragDown: null));
  SizedBox(width: 1, child: GestureDetector(onHorizontalDragCancel: null));
  SizedBox(width: 1, child: GestureDetector(onForcePressStart: null));
  SizedBox(width: 1, child: GestureDetector(onForcePressPeak: null));
  SizedBox(width: 1, child: GestureDetector(onForcePressUpdate: null));
  SizedBox(width: 1, child: GestureDetector(onForcePressEnd: null));
  SizedBox(width: 1, child: GestureDetector(onPanCancel: null));
  SizedBox(width: 1, child: InkWell(onSecondaryTapCancel: (null)));
  SizedBox(width: 1, child: InkResponse(onSecondaryTapCancel: null));
  SizedBox(width: 1, child: InkWell(onHover: (_) {}, onFocusChange: (_) {}, onHighlightChanged: (_) {}));
  SizedBox(width: 1, child: InkResponse(onHover: (_) {}, onFocusChange: (_) {}, onHighlightChanged: (_) {}));
  SizedBox(width: 48, child: GestureDetector(onSecondaryLongPress: () {}));
  SizedBox(height: 48, child: GestureDetector(onTapMove: (_) {}, onTap: () {}));
}

void inertRuntimeCallbacks(dynamic callback) {
  SizedBox(width: 1, child: GestureDetector(onTapMove: callback));
  f.SizedBox(width: 1, child: f.GestureDetector(onTapMove: (_) {}));
  SizedBox(width: 1, child: GestureDetector(onTapMove: callback, onTap: (null)));
  SizedBox(width: 1, child: InkWell(onSecondaryTapCancel: () {}));
  SizedBox(width: 1, child: InkResponse(onSecondaryTapCancel: (callback)));
  SizedBox(width: 1, child: InkWell(onTapCancel: callback));
  SizedBox(width: 1, child: InkResponse(onTapCancel: () {}));
  SizedBox(width: 1, child: InkWell(onTapCancel: callback, onSecondaryTapCancel: callback));
  SizedBox(width: 1, child: InkResponse(onTapCancel: callback, onSecondaryTapCancel: callback));
  SizedBox(width: 1, child: InkWell(onTapCancel: callback, onSecondaryTapCancel: callback,
    onTap: null, onTapDown: null, onTapUp: null, onDoubleTap: null,
    onLongPress: null, onLongPressUp: null,
    onSecondaryTap: null, onSecondaryTapDown: (null), onSecondaryTapUp: null));
  SizedBox(width: 1, child: InkResponse(onTapCancel: callback, onSecondaryTapCancel: callback,
    onTap: null, onTapDown: null, onTapUp: null, onDoubleTap: null,
    onLongPress: null, onLongPressUp: null,
    onSecondaryTap: null, onSecondaryTapDown: null, onSecondaryTapUp: (null)));
}

Configure minimum-touch-target

Set its severity in falcon.json. See the configuration guide.

falcon.jsonjson
{
  "linter": {
    "rules": {
      "a11y": {
        "minimum-touch-target": "error"
      }
    }
  }
}

Or silence one occurrence with a suppression comment; the reason is required.

example.dartdart
// falcon-ignore lint/a11y/minimum-touch-target: <reason>