@@ -30,6 +30,7 @@ void main() {
3030 }
3131
3232 final ForcePressGestureRecognizer force = ForcePressGestureRecognizer ();
33+ addTearDown (force.dispose);
3334
3435 force.onStart = onStart;
3536 force.onPeak = (ForcePressDetails details) => peaked += 1 ;
@@ -113,6 +114,7 @@ void main() {
113114 int ended = 0 ;
114115
115116 final ForcePressGestureRecognizer force = ForcePressGestureRecognizer ();
117+ addTearDown (force.dispose);
116118
117119 force.onStart = (ForcePressDetails details) => started += 1 ;
118120 force.onPeak = (ForcePressDetails details) => peaked += 1 ;
@@ -167,6 +169,7 @@ void main() {
167169 int ended = 0 ;
168170
169171 final ForcePressGestureRecognizer force = ForcePressGestureRecognizer ();
172+ addTearDown (force.dispose);
170173
171174 force.onStart = (_) => started += 1 ;
172175 force.onPeak = (_) => peaked += 1 ;
@@ -204,6 +207,7 @@ void main() {
204207
205208 testGesture ('Should recognize drag and not force touch if there is a drag recognizer' , (GestureTester tester) {
206209 final PanGestureRecognizer drag = PanGestureRecognizer ();
210+ addTearDown (drag.dispose);
207211
208212 // Device specific constants that represent those from the iPhone X
209213 const double pressureMin = 0 ;
@@ -215,6 +219,7 @@ void main() {
215219 int ended = 0 ;
216220
217221 final ForcePressGestureRecognizer force = ForcePressGestureRecognizer ();
222+ addTearDown (force.dispose);
218223
219224 force.onStart = (_) => started += 1 ;
220225 force.onPeak = (_) => peaked += 1 ;
@@ -276,6 +281,7 @@ void main() {
276281
277282 testGesture ('Should not call ended on pointer up if the gesture was never accepted' , (GestureTester tester) {
278283 final PanGestureRecognizer drag = PanGestureRecognizer ();
284+ addTearDown (drag.dispose);
279285
280286 // Device specific constants that represent those from the iPhone X
281287 const double pressureMin = 0 ;
@@ -287,6 +293,7 @@ void main() {
287293 int ended = 0 ;
288294
289295 final ForcePressGestureRecognizer force = ForcePressGestureRecognizer ();
296+ addTearDown (force.dispose);
290297
291298 force.onStart = (_) => started += 1 ;
292299 force.onPeak = (_) => peaked += 1 ;
@@ -321,6 +328,7 @@ void main() {
321328
322329 testGesture ('Should call start only once if there is a competing gesture recognizer' , (GestureTester tester) {
323330 final PanGestureRecognizer drag = PanGestureRecognizer ();
331+ addTearDown (drag.dispose);
324332
325333 // Device specific constants that represent those from the iPhone X
326334 const double pressureMin = 0 ;
@@ -332,6 +340,7 @@ void main() {
332340 int ended = 0 ;
333341
334342 final ForcePressGestureRecognizer force = ForcePressGestureRecognizer ();
343+ addTearDown (force.dispose);
335344
336345 force.onStart = (_) => started += 1 ;
337346 force.onPeak = (_) => peaked += 1 ;
@@ -398,6 +407,7 @@ void main() {
398407 }
399408
400409 final ForcePressGestureRecognizer force = ForcePressGestureRecognizer (interpolation: interpolateWithEasing);
410+ addTearDown (force.dispose);
401411
402412 force.onStart = onStart;
403413 force.onPeak = (ForcePressDetails details) => peaked += 1 ;
@@ -488,6 +498,7 @@ void main() {
488498 int ended = 0 ;
489499
490500 final ForcePressGestureRecognizer force = ForcePressGestureRecognizer ();
501+ addTearDown (force.dispose);
491502
492503 force.onStart = (_) => started += 1 ;
493504 force.onPeak = (_) => peaked += 1 ;
@@ -536,6 +547,7 @@ void main() {
536547 int ended = 0 ;
537548
538549 final ForcePressGestureRecognizer force = ForcePressGestureRecognizer ();
550+ addTearDown (force.dispose);
539551
540552 force.onStart = (_) => started += 1 ;
541553 force.onPeak = (_) => peaked += 1 ;
0 commit comments