Unverified Commit 96ae589a authored by Justin McCandless's avatar Justin McCandless Committed by GitHub

Fix new analyzer rule failure (#67656)

parent 8693824d
...@@ -107,17 +107,15 @@ void main() { ...@@ -107,17 +107,15 @@ void main() {
expect(find.text('Add'), findsNothing); expect(find.text('Add'), findsNothing);
// Test hover for tooltip. // Test hover for tooltip.
TestGesture? gesture = await tester.createGesture(kind: PointerDeviceKind.mouse); final TestGesture gesture = await tester.createGesture(kind: PointerDeviceKind.mouse);
await gesture!.addPointer(); await gesture.addPointer();
addTearDown(() => gesture?.removePointer()); addTearDown(() => gesture.removePointer());
await gesture.moveTo(tester.getCenter(find.byType(FloatingActionButton))); await gesture.moveTo(tester.getCenter(find.byType(FloatingActionButton)));
await tester.pumpAndSettle(); await tester.pumpAndSettle();
expect(find.text('Add'), findsOneWidget); expect(find.text('Add'), findsOneWidget);
await gesture.moveTo(Offset.zero); await gesture.moveTo(Offset.zero);
await gesture.removePointer();
gesture = null;
await tester.pumpAndSettle(); await tester.pumpAndSettle();
expect(find.text('Add'), findsNothing); expect(find.text('Add'), findsNothing);
...@@ -144,9 +142,9 @@ void main() { ...@@ -144,9 +142,9 @@ void main() {
expect(find.text('Add'), findsNothing); expect(find.text('Add'), findsNothing);
// Test hover for tooltip. // Test hover for tooltip.
TestGesture? gesture = await tester.createGesture(kind: PointerDeviceKind.mouse); final TestGesture gesture = await tester.createGesture(kind: PointerDeviceKind.mouse);
await gesture!.addPointer(); await gesture.addPointer();
addTearDown(() => gesture?.removePointer()); addTearDown(() => gesture.removePointer());
await tester.pumpAndSettle(); await tester.pumpAndSettle();
await gesture.moveTo(tester.getCenter(find.byType(FloatingActionButton))); await gesture.moveTo(tester.getCenter(find.byType(FloatingActionButton)));
await tester.pumpAndSettle(); await tester.pumpAndSettle();
...@@ -154,8 +152,6 @@ void main() { ...@@ -154,8 +152,6 @@ void main() {
expect(find.text('Add'), findsOneWidget); expect(find.text('Add'), findsOneWidget);
await gesture.moveTo(Offset.zero); await gesture.moveTo(Offset.zero);
await gesture.removePointer();
gesture = null;
await tester.pumpAndSettle(); await tester.pumpAndSettle();
expect(find.text('Add'), findsNothing); expect(find.text('Add'), findsNothing);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment