marker_widget 1.0.0 copy "marker_widget: ^1.0.0" to clipboard
marker_widget: ^1.0.0 copied to clipboard

Render any Flutter widget into a google_maps_flutter BitmapDescriptor, with caching, proper pixel-ratio handling, and modern Flutter View APIs.

Changelog #

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

1.0.0 - 2025-11-24 #

Added #

  • Initial release of marker_widget.
  • Off-screen renderer that converts any Widget into PNG bytes using:
    • RenderView + ViewConfiguration with logical & physical constraints.
    • RepaintBoundary and explicit PipelineOwner / BuildOwner lifecycle.
  • MarkerIcon value object that encapsulates:
    • PNG bytes.
    • Logical size.
    • Device pixel ratio.
    • Conversion to BitmapDescriptor.bytes with MapBitmapScaling.
  • MarkerIconRenderer:
    • Configurable default logical size.
    • Optional LRU-based in-memory cache with size limit.
    • Optional image-aware second pass via waitForImages.
  • MarkerIconScalingMode:
    • logicalSize mode (stable logical size, default).
    • imagePixelRatio mode (pixel-perfect using imagePixelRatio).
  • WidgetMarkerExtension.toMarkerBitmap:
    • Convert any widget into a BitmapDescriptor using the default (or injected) renderer.
    • Supports waitForImages, custom pixel ratio, bitmap scaling, and scaling mode.
  • Top-level widgetToMarkerBitmap helper for use without a BuildContext.
  • buildMarkerCacheKey helper for theme/locale/size-aware marker caching.
  • Example app demonstrating:
    • Basic usage with a custom card-like marker.
    • Toggling between logical-size and image-pixel-ratio scaling modes.
0
likes
160
points
12
downloads

Publisher

verified publishertomars.tech

Weekly Downloads

Render any Flutter widget into a google_maps_flutter BitmapDescriptor, with caching, proper pixel-ratio handling, and modern Flutter View APIs.

Repository (GitHub)
View/report issues

Topics

#google-maps #google-maps-flutter #map #marker #widget

Documentation

Documentation
API reference

License

MIT (license)

Dependencies

flutter, google_maps_flutter

More

Packages that depend on marker_widget