Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel beta, 3.3.0-0.1.pre, on macOS 11.4 20F71 darwin-x64, locale en-IN)
[!] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
✗ cmdline-tools component is missing
Run `path/to/sdkmanager --install "cmdline-tools;latest"`
See https://developer.android.com/studio/command-line for more details.
✗ Android license status unknown.
Run `flutter doctor --android-licenses` to accept the SDK licenses.
See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.
[✓] Xcode - develop for iOS and macOS (Xcode 13.0)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2020.3)
[✓] VS Code (version 1.70.0)
[✓] Connected device (3 available)
[✓] HTTP Host Availability
We should not call anything inside onMapCreated. Always call inside onStyleLoadedCallback or after it completes.
Fixed by moving functions inside onStyleLoadedCallback.
As
addGeoJsonSource
is future, it makes sense to add theawait
keyword before it but when I useawait
it throws platform exception.Here is the code snippet,
Without
await
, it works fine