setOrientationLandscape method Null safety

Future<bool> setOrientationLandscape()

Only works on Android and iOS return false if current orientation is landscape return true if current orientation is portrait and after this API call finished, the orientation becomes landscape. return false if can't change orientation.


static Future<bool> setOrientationLandscape() async {
  if (isDesktop()) return Future.value(false);
  bool? changed = await _channel.invokeMethod("setOrientationLandscape");
      [DeviceOrientation.landscapeRight, DeviceOrientation.landscapeLeft]);
  return Future.value(changed);