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