CallbackMapInfoWindowAdapter class
Wires MapCustomInfoWindow to any map SDK via callbacks (no extra dependencies).
With google_maps_flutter in your app:
final adapter = CallbackMapInfoWindowAdapter(
onGetScreenCoordinate: (latLng) async {
final coord = await googleMapController.getScreenCoordinate(
LatLng(latLng.latitude, latLng.longitude),
);
return MapScreenCoordinate(coord.x, coord.y);
},
);
controller.mapAdapter = adapter;
- Implemented types
Constructors
-
CallbackMapInfoWindowAdapter({required Future<
MapScreenCoordinate> onGetScreenCoordinate(MapLatLng latLng), double onDevicePixelRatio(BuildContext context)?})
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- onDevicePixelRatio → double Function(BuildContext context)?
-
final
-
onGetScreenCoordinate
→ Future<
MapScreenCoordinate> Function(MapLatLng latLng) -
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
devicePixelRatio(
BuildContext context) → double -
override
-
getScreenCoordinate(
MapLatLng latLng) → Future< MapScreenCoordinate> -
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