縦に固定したい。
Flutter: How to avoid change orientation? - Stack Overflow
SystemChrome.setPreferredOrientations([ DeviceOrientation.landscapeRight, DeviceOrientation.landscapeLeft, ]);
書けばいいっぽい。
Chrome
って。。。
使うにはまず
import 'package:flutter/services.dart';
ってインポートする。
僕はmain.dart
に記載した。
main()
の中で、
void main() { SystemChrome.setPreferredOrientations([ DeviceOrientation.portraitDown, DeviceOrientation.portraitUp, ]); runApp(new MyApp()); }
あたりに書いた。