child property

Widget child
final

The Google Maps Widget as child

Declare future Completer to capture Google Maps controller on onMapCreated

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 Widget child;