mapbox / mapbox/mapbox-maps-flutter

Subscribing to MapEvents.RESOURCE_REQUEST throws MissingPluginException();

Open
#302 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Dart
Stars
380
Forks
204
PR merge metrics
No merged PRs in 30d

Description

version: mapbox_maps_flutter 0.5.0

Steps to reproduce:
```
Future _onMapCreated(MapboxMap mapboxMap) async {
this.mapboxMap = mapboxMap;

mapboxMap.subscribe(_onMapEvent, [
MapEvents.RESOURCE_REQUEST,
]);
```

throws `MissingPluginException()` in mapbox_maps_platform.dart [104] as `eventType` is not caught in the `switch` statement [50]

Flutter doctor:
[✓] Flutter (Channel stable, 3.13.6, on macOS 14.1.1 23B81 darwin-x64, locale en-GB)
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision ead455963c (8 weeks ago), 2023-09-26 18:28:17 -0700
• Engine revision a794cf2681
• Dart version 3.1.3
• DevTools version 2.25.0
[✗] Android toolchain - develop for Android devices
✗ Unable to locate Android SDK.
Install Android Studio from: https://developer.android.com/studio/index.html
On first launch it will assist you in installing the Android SDK components.
(or visit https://flutter.dev/docs/get-started/install/macos#android-setup for detailed instructions).
If the Android SDK has been installed to a custom location, please use
`flutter config --android-sdk` to update to that location.

[✓] Xcode - develop for iOS and macOS (Xcode 15.0)
[✓] Chrome - develop for the web
[!] Android Studio (not installed)
[✓] VS Code (version 1.84.2)
[✓] Connected device (2 available)
[✓] Network resources

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in mapbox_maps_platform.dart around the switch at line 50 and the MissingPluginException reported at line 104. Reproduce the MapEvents.RESOURCE_REQUEST subscription from the issue, then verify that the event no longer throws and is handled consistently with the other event types.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart
Domain
mobile-dev
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.