1{2 "skill_name": "mapbox-flutter-patterns",3 "evals": [4 {5 "id": 1,6 "prompt": "I'm adding Mapbox to an existing Flutter app. What are the minimum platform requirements I need to set on iOS and Android before the build succeeds?",7 "expectations": [8 "iOS deployment target must be bumped to 14.0 (Runner target in Xcode, and the Podfile platform line if a Podfile exists)",9 "Identifies the iOS deployment target as the single most common iOS build failure cause",10 "Android minSdk must be 21 or higher"
11 "Does NOT insist CocoaPods is required — mentions that the plugin supports both CocoaPods and SPM and Flutter chooses automatically (or simply does not force one)",
12 "Does not suggest hard-coding the iOS version only in pbxproj without updating the Runner target in Xcode"
13 ]
14 },
15 {
16 "id": 2,
17 "prompt": "How should I configure the Mapbox access token in my Flutter app without checking it into the repo?",
18 "expectations": [
19 "Pass the token via `--dart-define=ACCESS_TOKEN=pk.your_token` at `flutter run` / `flutter build` time",
20 "Read it in Dart with `const accessToken = String.fromEnvironment('ACCESS_TOKEN');`",
21 "Call `MapboxOptions.setAccessToken(accessToken)` in `main()` before `runApp`, so the token is set before any `MapWidget` is created",
22 "Does NOT suggest hard-coding the token in source code or putting it in pubspec.yaml",
23 "For CI, suggests reading the token from an environment variable and forwarding it via --dart-define"
24 ]
25 },
26 {
27 "id": 3,
28 "prompt": "I have a `PointAnnotationManager` in my Flutter app and I want my annotations to be tappable. What's the current non-deprecated API?",
31 "Explicitly calls out that `addOnPointAnnotationClickListener` is deprecated and should not be used",
32 "Stores the returned Cancelable and calls `.cancel()` when the listener is no longer needed (e.g. in `dispose`)",
33 "Mentions that the same `tapEvents` / `longPressEvents` / `dragEvents` pattern is available on every annotation manager type"
34 ]
35 },
36 {
37 "id": 4,
38 "prompt": "I have a `coffee_shops.geojson` file in my Flutter app assets. How do I display each feature as a point annotation on a Mapbox map?",
39 "expectations": [
40 "Load the file contents with `rootBundle.loadString('assets/coffee_shops.geojson')`",
41 "Register the asset path under `flutter: assets:` in pubspec.yaml",
42 "Decode JSON and iterate `features`, reading each geometry's `coordinates` as `[lng, lat]`",
43 "Create a single `PointAnnotationManager` via `mapboxMap.annotations.createPointAnnotationManager()` and call `createMulti(options)` — not one call per feature",
44 "Wraps coordinates in `Point(coordinates: Position(lng, lat))`",
45 "Mentions that for thousands of features, a `GeoJsonSource` + `SymbolLayer` is more appropriate than annotations"
46 ]
47 },
48 {
49 "id": 5,
50 "prompt": "My Flutter Mapbox map shows a blank grid and no tiles load. I pass --dart-define=ACCESS_TOKEN=... but nothing renders. What's likely wrong?",
51 "expectations": [
52 "Most likely cause: `MapboxOptions.setAccessToken(...)` is never called, or is called after the `MapWidget` is already built",
53 "Verify the token is read with `String.fromEnvironment('ACCESS_TOKEN')` using the exact same key passed to --dart-define",
54 "Call `MapboxOptions.setAccessToken(...)` in `main()` before `runApp`",
55 "Confirm the token is a public token (starts with `pk.`) and has not been revoked",
56 "Does NOT suggest the deployment target is the issue — that would be a compile-time failure, not a runtime blank map"