Using services library to lock the device orientation
import 'package:flutter/servics.dart'; ... void main() async { await SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]); runApp(App()); }
import 'package:flutter/servics.dart'; ... void main() async { await SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp]); runApp(App()); }