init method

Future<GoogleMapController> init (
  1. int id,
  2. CameraPosition initialCameraPosition,
  3. _GoogleMapState googleMapState
)

Initialize control of a GoogleMap with id.

Mainly for internal use when instantiating a GoogleMapController passed in GoogleMap.onMapCreated callback.

Implementation

static Future<GoogleMapController> init(
  int id,
  CameraPosition initialCameraPosition,
  _GoogleMapState googleMapState,
) async {
  assert(id != null);
  await _googleMapsFlutterPlatform.init(id);
  return GoogleMapController._(
    initialCameraPosition,
    googleMapState,
    mapId: id,
  );
}