setLandscape static method

Future<void> setLandscape()

Implementation

static Future<void> setLandscape() async {
  WidgetsFlutterBinding.ensureInitialized();
  await setPreferredOrientations([
    DeviceOrientation.landscapeRight,
    DeviceOrientation.landscapeLeft,
  ]);
}