flutter-cupertino-store
flutter-cupertino-store copied to clipboard
ensureInitialized() missing before setPreferredOrientations()
@Flutter 1.12.13+hotfix.5 From: https://codelabs.developers.google.com/codelabs/flutter-cupertino/#2
On the first run of this lab, an error shows up when calling setPreferredOrientations() in main() because WidgetsFlutterBinding.ensureInitialized(); needs to be called first.
That line of code is missing from the codelab. Adding it solves the issue.

this fixed the issue for me, too.
the codelab code sample here should be updated, too: https://codelabs.developers.google.com/codelabs/flutter-cupertino/#2