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