Force benchmark app to portrait (#112502)
This commit is contained in:
parent
9e95f5f75e
commit
1bdba68d16
@ -4,6 +4,7 @@
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/scheduler.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_test/flutter_test.dart' show collectAllElementsFrom;
|
||||
|
||||
import '../common.dart';
|
||||
@ -42,6 +43,12 @@ Future<void> main() async {
|
||||
),
|
||||
));
|
||||
|
||||
// Lists may not be scrolled into frame in landscape.
|
||||
SystemChrome.setPreferredOrientations(<DeviceOrientation>[
|
||||
DeviceOrientation.portraitUp,
|
||||
DeviceOrientation.portraitDown,
|
||||
]);
|
||||
|
||||
// Wait for frame rendering to stabilize.
|
||||
for (int i = 0; i < 5; i++) {
|
||||
await SchedulerBinding.instance.endOfFrame;
|
||||
|
Loading…
x
Reference in New Issue
Block a user