Skip to content

[google_maps_flutter_web] Add editable polyline and polygon support#11919

Draft
lume-code wants to merge 1 commit into
flutter:mainfrom
lume-code:editable-shapes-web
Draft

[google_maps_flutter_web] Add editable polyline and polygon support#11919
lume-code wants to merge 1 commit into
flutter:mainfrom
lume-code:editable-shapes-web

Conversation

@lume-code

@lume-code lume-code commented Jun 17, 2026

Copy link
Copy Markdown

⚠️ Draft — blocked on the platform interface landing.
This is part 2 of 3 splitting #11492 along the federated plugin, per the
contributing guidelines.
It depends on google_maps_flutter_platform_interface 2.16.0 (#11492). Once that lands in main, CI's pathified jobs (make-deps-path-based) resolve the in-repo interface automatically; this PR will be marked ready then (and is fully green once 2.16.0 publishes to pub.dev).

Implements editable polylines and polygons on the web platform, using the native Google Maps JavaScript API editable feature.

Changes — google_maps_flutter_web (0.6.2+3 → 0.7.0)

  • Wires editable through _polylineOptionsFromPolyline() / _polygonOptionsFromPolygon().
  • Subscribes to the path MVCArray events (onSetAt, onInsertAt, onRemoveAt) in PolylineController / PolygonController.
  • Emits PolylineEditEvent / PolygonEditEvent (including polygon holes) over the shared event stream.
  • Recreates the controller on change so edit listeners are rewired when editable toggles.
  • Adds integration tests for the edit events in example/latest/integration_test/.

This feature is web-only; the editable property is silently ignored on Android and iOS.

Part of #11492 · Interface PR: #11492 · App-facing PR: #11920 · Fixes flutter/flutter#71248

Pre-Review Checklist

Footnotes

  1. See the test exemption and version/CHANGELOG exemption docs for details. 2

Implements editable polylines and polygons on web using the Google Maps
JavaScript API `editable` flag:
- Wires `editable`/`onEdited` through to the JS `Polyline`/`Polygon` controllers.
- Listens to MVCArray path-change events and emits `PolylineEditEvent` /
  `PolygonEditEvent` (including polygon holes).
- Recreates the controller on change so edit listeners rewire when `editable` toggles.

Bumps to 0.7.0. Second of three PRs splitting flutter#11492; depends on
google_maps_flutter_platform_interface 2.16.0.
@lume-code lume-code force-pushed the editable-shapes-web branch from 32cd208 to a1ae3bc Compare June 18, 2026 05:14
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.

[google_maps_flutter_web] Add "User-Editable Shapes" feature

1 participant