Answers for "how to set device into autorotate in flutter"

0

how to set device into autorotate in flutter

void initState() {
    super.initState();
    SystemChrome.setPreferredOrientations([
      DeviceOrientation.landscapeRight,
      DeviceOrientation.landscapeLeft,
    ]);
  }
  @override
  dispose(){
     SystemChrome.setPreferredOrientations([
        DeviceOrientation.portraitUp,
        DeviceOrientation.portraitDown,
      ]);
    super.dispose();
  }
Posted by: Guest on October-14-2021

Code answers related to "how to set device into autorotate in flutter"

Code answers related to "Dart"

Browse Popular Code Answers by Language