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
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.
- image_cropper
A Flutter plugin for Android, iOS and Web supports cropping images
84Compare - cached_network_svg_image
Load and cache SVG images from the network in Flutter
57Compare - image_picker_ios
iOS implementation of the image_picker plugin.
81Compare - image_picker_android
Android implementation of the image_picker plugin for selecting photos and videos.
81Compare
Works with
Packages commonly used together with custom_marker: ones it builds on, ones built on it, and its own family.
- flutter_svgcustom_marker depends on itRenders Scalable Vector Graphics (SVG 1.1) and precompiled vector graphics in Flutter.
- flutter_cache_managercustom_marker depends on itGeneric cache manager for saving web files and cache info on device storage.
- google_maps_fluttercustom_marker depends on itA Flutter plugin for integrating Google Maps in Android, iOS, and web applications.