Flutter Lock Screen To Portrait Mode

[Solved] Flutter Lock Screen To Portrait Mode | Dart - Code Explorer | yomemimo.com
Question : flutter lock screen to portrait mode

Answered by : mangaliso-earnshaw

void main() {
// flutter lock screen to portrait mode WidgetsFlutterBinding.ensureInitialized(); SystemChrome.setPreferredOrientations([ DeviceOrientation.portraitUp, DeviceOrientation.portraitDown, ]); runApp(MyBudgetApp());
}

Source : | Last Update : Wed, 25 Nov 20

Question : flutter lock orientation for page

Answered by : encouraging-eland-9vc7xv08fqcy

@override
dispose(){ SystemChrome.setPreferredOrientations([ DeviceOrientation.landscapeRight, DeviceOrientation.landscapeLeft, DeviceOrientation.portraitUp, DeviceOrientation.portraitDown, ]); super.dispose();
}

Source : https://stackoverflow.com/questions/50322054/flutter-how-to-set-and-lock-screen-orientation-on-demand | Last Update : Tue, 15 Sep 20

Answers related to flutter lock screen to portrait mode

Code Explorer Popular Question For Dart