Skip to content
pubscout

custom_marker

1.0.0, released 5 years ago by an unverified publisher

Convert widgets, local, network images or SVGs to BitmapDescriptor for google_maps_flutter markers

$ flutter pub add custom_marker
Source repository

What it does

Provides helper functions to turn a widget, asset image, network image or SVG into a BitmapDescriptor that can be used as a marker icon. Supports custom shapes, borders and text overlays.

AI-written summary of version 1.0.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need custom marker icons that are not simple icons
  • You want to use a widget or SVG as a marker
  • You need to load images from the network and resize them for markers

Skip it when

  • You only need default marker icons
  • You are targeting non-Flutter platforms

Strengths

  • Simple API, single dependency
  • Supports widgets, assets, network images, SVGs, and custom text overlays
  • Handles resizing and border styling

Weaknesses

  • Only works with google_maps_flutter
  • Requires async calls for image loading
  • No support for other map plugins

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
3

Add dependency and import package; no special permissions needed

```dart
final marker = await MarkerIcon.downloadResizePictureCircle(
  'https://example.com/image.png',
  size: 150,
  addBorder: true,
  borderColor: Colors.white,
  borderSize: 15,
);
Marker(
  markerId: MarkerId('id'),
  icon: marker,
  position: LatLng(35.0, 50.0),
);
```

Alternatives

Packages that do the same job and could replace custom_marker.

Works with

Packages commonly used together with custom_marker: ones it builds on, ones built on it, and its own family.