Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR DART

how to stop screen rotation in flutter

  class MyApp extends StatelessWidget {
    @override
    Widget build(BuildContext context) {
      SystemChrome.setPreferredOrientations([
        DeviceOrientation.portraitUp,
        DeviceOrientation.portraitDown,
      ]);
      return new MaterialApp(...);
    }
  }
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #stop #screen #rotation #flutter
ADD COMMENT
Topic
Name
4+9 =