how to block rotate in flutter code example
Example: flutter block rotation
class MyApp extends StatelessWidget {
Widget build(BuildContext context) {
// This vvvv
SystemChrome.setPreferredOrientations([
DeviceOrientation.portraitUp,
DeviceOrientation.portraitDown,
]);
// ^^^^
return new MaterialApp(...);
}
}