import 'package:flutter/services.dart';
import 'package:orientation/orientation.dart';

class OrientationHelper {
  /// 横屏
  static void setLandscapeLeft(){
    OrientationPlugin.forceOrientation(DeviceOrientation.landscapeLeft);
  }
  static void setLandscapeRight(){
    OrientationPlugin.forceOrientation(DeviceOrientation.landscapeRight);
  }

  /// 竖屏
  static void setPortraitUp(){
    OrientationPlugin.forceOrientation(DeviceOrientation.portraitUp);
  }
  static void setPortraitDown(){
    OrientationPlugin.forceOrientation(DeviceOrientation.portraitDown);
  }
}