This is an issue already brought up here. You should post the code indicated in the console. The important part seems to be line "#6" of the log, with the package flutter_sudoku lib/main.dart
file at line 17.
And looking at the github repository, indeed, they are making the main function "await" fot the system orientation to be ready here
void main() => SystemChrome.setPreferredOrientations([DeviceOrientation.portraitUp, DeviceOrientation.portraitDown])
.then((_) {
runApp(
BlocProvider(
bloc: UserDataBloc(),
child: MyApp(),
)
);
});
You must call WidgetsFlutterBinding.ensureInitialized();
before the await function
void main() {
WidgetsFlutterBinding.ensureInitialized();
SystemChrome.setPreferredOrientations(
[DeviceOrientation.portraitUp, DeviceOrientation.portraitDown]).then((_) {
runApp(BlocProvider(
bloc: UserDataBloc(),
child: MyApp(),
));
});
}