LazarilloMapWidget
A widget that displays a Lazarillo map using native platform views.
Provides methods to interact with the map after it is ready, including adding routes, markers, controlling the camera, and managing floor selection.
Use LazarilloMaps.getLazarilloMapWidget() to create instances of this widget.
Constructors
LazarilloMapWidget.new
LazarilloMapWidget.new({Key? key, required String apiKey, TextDirection? layoutDirection, required MapConfiguration mapConfiguration, required dynamic onMapReady(String)?})Creates a Lazarillo map widget.
Properties
| Property | Type | Description |
|---|---|---|
apiKey | String | The API key used to authenticate with the Lazarillo platform. (final) |
layoutDirection | TextDirection? | Optional text direction override for the platform view. (final) |
mapConfiguration | MapConfiguration | Configuration for the map’s initial state and UI controls. (final) |
onMapReady | dynamic Function(String | Callback invoked with the map’s unique ID when the native view is ready. (final) |
uuid | String | Unique identifier for this map instance. (final) |
Methods
addMarker
addMarker(LzMarker marker) → Future<String>Adds a marker to this map and returns the marker’s assigned ID.
addRoute
addRoute(RouteConfiguration routeConfiguration) → Future<LzRoute?>Creates a route on the map with enhanced origin handling and fallback logic.
clearMarkers
clearMarkers() → Future<void>Removes all markers from this map.
clearRoute
clearRoute() → Future<void>Removes the current route from this map.
clearSelectedPlace
clearSelectedPlace() → Future<void>Clears the currently selected (highlighted) place on the map.
createState
createState() → State<LazarilloMapWidget>Creates the mutable state for this widget at a given location in the tree. override
hideLocationOnMap
hideLocationOnMap() → Future<void>Hides the user’s location indicator from this map.
removeCompassClickListener
removeCompassClickListener() → Future<void>Remove the compass click listener.
removeMarker
removeMarker(String markerId) → Future<void>Removes a specific marker identified by markerId from this map.
setFloor
setFloor(String floorId) → Future<void>Changes the displayed floor to the one identified by floorId.
setOnCompassClickListener
setOnCompassClickListener(void callback(double)) → Future<void>Set a callback to be notified when the user taps the compass button on the map.
showLocationOnMap
showLocationOnMap() → Future<void>Shows the user’s location indicator on this map.
startUpdatingTappedPlace
startUpdatingTappedPlace(void callback(String?)) → Future<void>Starts listening for place tap events on the map.
stopUpdatingTappedPlace
stopUpdatingTappedPlace() → Future<void>Stops listening for place tap events previously started with startUpdatingTappedPlace.