Catch Stopwatch with static analysis (#140019)
I did not include the `'// flutter_ignore_for_file: stopwatch (see analyze.dart)'` directive since it's currently not used, and adding that shouldn't be too difficult.
This commit is contained in:
@@ -47,7 +47,8 @@ class TestSamplingClock implements SamplingClock {
|
||||
DateTime now() => clock.now();
|
||||
|
||||
@override
|
||||
Stopwatch stopwatch() => clock.stopwatch();
|
||||
Stopwatch stopwatch() => clock.stopwatch(); // flutter_ignore: stopwatch (see analyze.dart)
|
||||
// Ignore context: FakeAsync controls clock.stopwatch(), this is safe in tests.
|
||||
}
|
||||
|
||||
typedef ResampleEventTest = void Function(FakeAsync async);
|
||||
|
||||
Reference in New Issue
Block a user