@@ -63,8 +63,9 @@ void main() {
63
63
});
64
64
65
65
testGesture ('MultiDrag: can filter based on device kind' , (GestureTester tester) {
66
- final DelayedMultiDragGestureRecognizer drag =
67
- DelayedMultiDragGestureRecognizer (kind: PointerDeviceKind .touch);
66
+ final DelayedMultiDragGestureRecognizer drag = DelayedMultiDragGestureRecognizer (
67
+ supportedDevices: < PointerDeviceKind > { PointerDeviceKind .touch },
68
+ );
68
69
69
70
bool didStartDrag = false ;
70
71
drag.onStart = (Offset position) {
@@ -89,61 +90,4 @@ void main() {
89
90
expect (didStartDrag, isFalse);
90
91
drag.dispose ();
91
92
});
92
-
93
- testWidgets ('ImmediateMultiGestureRecognizer asserts when kind and supportedDevices are both set' , (WidgetTester tester) async {
94
- try {
95
- ImmediateMultiDragGestureRecognizer (
96
- kind: PointerDeviceKind .touch,
97
- supportedDevices: < PointerDeviceKind > { PointerDeviceKind .touch },
98
- );
99
- } catch (error) {
100
- expect (error, isAssertionError);
101
- expect (error.toString (), contains ('kind == null || supportedDevices == null' ));
102
- }
103
- });
104
-
105
- testWidgets ('HorizontalMultiDragGestureRecognizer asserts when kind and supportedDevices are both set' , (WidgetTester tester) async {
106
- expect (
107
- () {
108
- HorizontalMultiDragGestureRecognizer (
109
- kind: PointerDeviceKind .touch,
110
- supportedDevices: < PointerDeviceKind > { PointerDeviceKind .touch },
111
- );
112
- },
113
- throwsA (
114
- isA <AssertionError >().having ((AssertionError error) => error.toString (),
115
- 'description' , contains ('kind == null || supportedDevices == null' )),
116
- ),
117
- );
118
- });
119
-
120
- testWidgets ('VerticalMultiDragGestureRecognizer asserts when kind and supportedDevices are both set' , (WidgetTester tester) async {
121
- expect (
122
- () {
123
- VerticalMultiDragGestureRecognizer (
124
- kind: PointerDeviceKind .touch,
125
- supportedDevices: < PointerDeviceKind > { PointerDeviceKind .touch },
126
- );
127
- },
128
- throwsA (
129
- isA <AssertionError >().having ((AssertionError error) => error.toString (),
130
- 'description' , contains ('kind == null || supportedDevices == null' )),
131
- ),
132
- );
133
- });
134
-
135
- testWidgets ('DelayedMultiDragGestureRecognizer asserts when kind and supportedDevices are both set' , (WidgetTester tester) async {
136
- expect (
137
- () {
138
- DelayedMultiDragGestureRecognizer (
139
- kind: PointerDeviceKind .touch,
140
- supportedDevices: < PointerDeviceKind > { PointerDeviceKind .touch },
141
- );
142
- },
143
- throwsA (
144
- isA <AssertionError >().having ((AssertionError error) => error.toString (),
145
- 'description' , contains ('kind == null || supportedDevices == null' )),
146
- ),
147
- );
148
- });
149
93
}
0 commit comments