mapId property
Save the mapId from Google Maps widget related to this Animarker widget. This value is used underlying for the Native Google Maps Platform
final Completer<GoogleMapController> _controller = Completer();
Get the mapId when future GoogleMapController completes The mapId is required to place marker and circle at the correct Google Maps instance
_controller.future.then<int>((value) => value.mapId),
The basic setup for using Animarker for Google Maps
Animarker(
mapId: _controller.future.then<int>((value) => value.mapId),
child: GoogleMap(
...
onMapCreated: (controller) => _controller.complete(controller),
onCameraMove: (ca) => setState(() => zoom = ca.zoom),
...
),
)
Required field
Implementation
final Future<int> mapId;