setSystemOrientation static method

Future<void> setSystemOrientation(
  1. List<DeviceOrientation> orientations
)

DO THAT:

await SystemChrome.setPreferredOrientations(orientations)

Implementation

static Future<void> setSystemOrientation(
    List<DeviceOrientation> orientations) async {
  await SystemChrome.setPreferredOrientations(orientations);
}