[web_benchmark] Fix unnecessary_non_null_assertion for Scrollable.of. (#4155)

Remove unnecessary non null assertion.

Fixes [#114434](https://github.com/flutter/flutter/issues/114434)

*If you had to change anything in the [flutter/tests] repo, include a link to the migration guide as per the [breaking change policy].*
This commit is contained in:
Dima Brandorf
2023-06-29 16:02:00 +03:00
committed by GitHub
parent ff656d8b8b
commit 756f8262f9

View File

@ -39,10 +39,7 @@ class ScrollRecorder extends AppRecorder {
@override
Future<void> automate() async {
final ScrollableState scrollable =
// TODO(cyanglaz): Fix the unnecessary non null assertion when https://github.com/flutter/flutter/commit/37b72342b0ce86fbfc238a9d43e524608b89af3a is on stable,
// https://github.com/flutter/flutter/issues/114434
//ignore: unnecessary_non_null_assertion
Scrollable.of(find.byKey(textKey).evaluate().single)!;
Scrollable.of(find.byKey(textKey).evaluate().single);
await scrollable.position.animateTo(
30000,
curve: Curves.linear,