screenControl top-level constant

String const screenControl

Implementation

const screenControl = """
import 'package:flutter/services.dart';

class ScreenControl {
  static Future screenVertical() async {
    await SystemChrome.setPreferredOrientations(
        [DeviceOrientation.portraitUp, DeviceOrientation.portraitDown]);
  }

  static Future screenHorizontal() async {
    await SystemChrome.setPreferredOrientations(
        [DeviceOrientation.landscapeLeft, DeviceOrientation.landscapeRight]);
  }

  static Future screenRight() async {
    SystemChrome.setPreferredOrientations([DeviceOrientation.landscapeRight]);
  }

  static Future screenLeft() async {
    SystemChrome.setPreferredOrientations([DeviceOrientation.landscapeLeft]);
  }
}
    """;