Repository navigation
Commit 2141a43
authored
[google_maps_flutter_platform_interface] Fix PinConfig code sample (flutter#12259)
The second `PinConfig` sample in the `BitmapDescriptor` docs (`bitmap.dart:1009`) doesn't compile, for two reasons:
1. **Unbalanced parens** — the block opens `PinConfig(`, `BitmapGlyph(` and `BitmapDescriptor.asset(` but only closes two of them. (The sibling `TextGlyph` sample directly above closes correctly.)
2. **Missing `await`** — `BitmapDescriptor.asset` is declared `static Future<AssetMapBitmap> asset(...)` (line 278), while `BitmapGlyph.bitmap` is `final BitmapDescriptor bitmap;` (line 1106), so a bare `BitmapDescriptor.asset(...)` can't be assigned to it.
The repo's own examples use the awaited form — e.g. `google_maps_flutter_web/example/latest/integration_test/advanced_markers_test.dart:422`:
```dart
bitmap: await BitmapDescriptor.asset(
```
The sample now mirrors that. Paren balance goes from 5 open / 4 close to 5 / 5.
Doc comment only; bumped to 2.16.1 with a CHANGELOG entry per the versioning policy — happy to switch to `## NEXT` if that's preferred for a docs-only change.1 parent fdd7d39 commit 2141a43
3 files changed
Lines changed: 9 additions & 4 deletions
File tree
- packages/google_maps_flutter/google_maps_flutter_platform_interface
- lib/src/types
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
1 | 5 | | |
2 | 6 | | |
3 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1009 | 1009 | | |
1010 | 1010 | | |
1011 | 1011 | | |
1012 | | - | |
| 1012 | + | |
1013 | 1013 | | |
1014 | | - | |
1015 | | - | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
1016 | 1017 | | |
1017 | 1018 | | |
1018 | 1019 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
0 commit comments