preventLandScapeMode function Null safety

void preventLandScapeMode()

Implementation

void preventLandScapeMode() {
  SystemChrome.setPreferredOrientations(
    [
      DeviceOrientation.portraitUp,
      DeviceOrientation.portraitDown,
    ],
  );
}