Skip to content

[google_maps_flutter_platform_interface] Fix PinConfig code sample#12259

Open
meliharik wants to merge 1 commit into
flutter:mainfrom
meliharik:docs-fix-pinconfig-sample
Open

[google_maps_flutter_platform_interface] Fix PinConfig code sample#12259
meliharik wants to merge 1 commit into
flutter:mainfrom
meliharik:docs-fix-pinconfig-sample

Conversation

@meliharik

@meliharik meliharik commented Jul 21, 2026

Copy link
Copy Markdown

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 awaitBitmapDescriptor.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:

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.

Pre-launch Checklist

  • I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • I read the [Tree Hygiene] wiki page, which explains my responsibilities.
  • I read and followed the [relevant style guides] and ran the auto-formatter.
  • I signed the [CLA].
  • The title of the PR starts with the name of the package surrounded by square brackets.
  • I [linked to at least one issue that this PR fixes] in the description above. (No tracker issue exists for this; it's a two-line doc-sample fix. Happy to file one in flutter/flutter if required.)
  • I updated pubspec.yaml with an appropriate new version according to the [pub versioning philosophy], or I have commented below to indicate which [version change exemption] this PR falls under.
  • I updated CHANGELOG.md to add a description of the change, [following repository CHANGELOG style], or I have commented below to indicate which [CHANGELOG exemption] this PR falls under.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the google_maps_flutter_platform_interface package to version 2.16.1. The changes correct the PinConfig code sample in the BitmapDescriptor documentation by adding the await keyword to the asynchronous BitmapDescriptor.asset call and adjusting the formatting. There are no review comments, and I have no feedback to provide.

@stuartmorgan-g
stuartmorgan-g self-requested a review July 21, 2026 18:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant