HybridMapMarkerImpl class
A utility class for creating custom map markers from Flutter widgets.
This class provides functionality to convert Flutter widgets into bitmap descriptors that can be used as custom markers in Google Maps. It uses a singleton pattern to ensure consistent marker creation.
Example:
final marker = await HybridMapMarkerImpl.instance.createIcon(
Icon(Icons.location_on, size: 48),
size: Size(48, 48),
);
- Implemented types
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
cacheImage(
{required String path}) → Future< void> -
Important: This method must be called before createIcon if the widget
contains asset images. Otherwise, the image may not render correctly in the
generated marker icon.
override
-
cacheNetworkImage(
{required String path}) → Future< void> -
Important: This method must be called before createIcon if the widget
contains network images. Otherwise, the image may not render correctly in the
generated marker icon.
override
-
cacheSvg(
{required String path}) → Future< void> -
Important: This method must be called before createIcon if the widget
contains SVG images. Otherwise, the SVG may not render correctly in the
generated marker icon.
override
-
createIcon(
Widget widget, {required Size size, double quality = 1.0}) → Future< BitmapDescriptor> -
Converts a Flutter widget into a
BitmapDescriptorfor use as a map marker.override -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance → HybridMapMarkerImpl
-
final