forked from firka/flutter
This reverts commit e2490f2906.
This commit is contained in:
@@ -11,8 +11,8 @@ import 'package:flutter_test/flutter_test.dart';
|
||||
|
||||
Future<void> endOfAnimation() async {
|
||||
do {
|
||||
await SchedulerBinding.instance.endOfFrame;
|
||||
} while (SchedulerBinding.instance.hasScheduledFrame);
|
||||
await SchedulerBinding.instance!.endOfFrame;
|
||||
} while (SchedulerBinding.instance!.hasScheduledFrame);
|
||||
}
|
||||
|
||||
int iteration = 0;
|
||||
@@ -30,5 +30,5 @@ Future<void> main() async {
|
||||
await endOfAnimation();
|
||||
await Future<void>.delayed(const Duration(milliseconds: 50));
|
||||
debugPrint('==== MEMORY BENCHMARK ==== READY ====');
|
||||
WidgetsBinding.instance.addObserver(LifecycleObserver());
|
||||
WidgetsBinding.instance!.addObserver(LifecycleObserver());
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ Future<void> main() async {
|
||||
),
|
||||
));
|
||||
|
||||
await SchedulerBinding.instance.endOfFrame;
|
||||
await SchedulerBinding.instance!.endOfFrame;
|
||||
|
||||
// We are waiting for the GPU to rasterize a frame here. This makes this
|
||||
// flaky, we can rely on a more deterministic source such as
|
||||
@@ -48,7 +48,7 @@ Future<void> main() async {
|
||||
debugPrint('==== MEMORY BENCHMARK ==== READY ====');
|
||||
|
||||
final WidgetController controller =
|
||||
LiveWidgetController(WidgetsBinding.instance);
|
||||
LiveWidgetController(WidgetsBinding.instance!);
|
||||
|
||||
debugPrint('Scrolling...');
|
||||
final Finder list = find.byKey(const Key('ImageList'));
|
||||
|
||||
@@ -13,8 +13,8 @@ import 'package:flutter_test/flutter_test.dart';
|
||||
|
||||
Future<void> endOfAnimation() async {
|
||||
do {
|
||||
await SchedulerBinding.instance.endOfFrame;
|
||||
} while (SchedulerBinding.instance.hasScheduledFrame);
|
||||
await SchedulerBinding.instance!.endOfFrame;
|
||||
} while (SchedulerBinding.instance!.hasScheduledFrame);
|
||||
}
|
||||
|
||||
Rect boundsFor(WidgetController controller, Finder item) {
|
||||
@@ -35,7 +35,7 @@ Future<void> main() async {
|
||||
child: GalleryApp(testMode: true),
|
||||
),
|
||||
));
|
||||
await SchedulerBinding.instance.endOfFrame;
|
||||
await SchedulerBinding.instance!.endOfFrame;
|
||||
await Future<void>.delayed(const Duration(milliseconds: 50));
|
||||
debugPrint('==== MEMORY BENCHMARK ==== READY ====');
|
||||
|
||||
@@ -49,9 +49,9 @@ Future<void> main() async {
|
||||
child: GalleryApp(testMode: true),
|
||||
),
|
||||
));
|
||||
await SchedulerBinding.instance.endOfFrame;
|
||||
await SchedulerBinding.instance!.endOfFrame;
|
||||
|
||||
final WidgetController controller = LiveWidgetController(WidgetsBinding.instance);
|
||||
final WidgetController controller = LiveWidgetController(WidgetsBinding.instance!);
|
||||
|
||||
debugPrint('Navigating...');
|
||||
await controller.tap(find.text('Material'));
|
||||
|
||||
Reference in New Issue
Block a user