Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR DART

flutter portrait only

// This will works always for lock screen Orientation.
void main() {
  WidgetsFlutterBinding.ensureInitialized();
  SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp])
    .then((_) {
      runApp(new MyApp());
    });
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #flutter #portrait
ADD COMMENT
Topic
Name
3+2 =