Closed cristianfb1989 closed 4 years ago
// wait until setPreferredOrientations
is done and start the app
// this works.
void main() {
SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp])
.then((_) {
runApp(new MyApp());
});
}
@BharatsDruv Thank you very much!
Hello everyone, I tell you to configure the necessary codes to block but even so, to change the position of the cell phone, the camera does the rotation. Can someone help me?
android\app\src\main\AndroidManifest.xml
<activity android:name=".MainActivity" android:launchMode="singleTop" android:theme="@style/LaunchTheme" android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|layoutDirection|fontScale|screenLayout|density" android:hardwareAccelerated="true" android:windowSoftInputMode="adjustResize" android:screenOrientation="portrait">
lib\main.dart
void main() { SystemChrome.setPreferredOrientations([ DeviceOrientation.portraitUp, ]); runApp(MyApp()); }
plugins\flutter_barcode_reader-master\android\src\main\AndroidManifest.xml `
`
plugins\flutter_barcode_reader-master\ example \android\app\src\main\AndroidManifest.xml
plugins\flutter_barcode_reader-master\ example \lib\main.dart