init static method

Future<AMapController> init(
  1. int id,
  2. CameraPosition initialCameration,
  3. _MapState mapState
)

根据传入的id初始化AMapController 主要用于在AMapWidget初始化时在AMapWidget.onMapCreated中初始化controller

Implementation

static Future<AMapController> init(
  int id,
  CameraPosition initialCameration,
  _MapState mapState,
) async {
  await _methodChannel.init(id);
  return AMapController._(
    initialCameration,
    mapState,
    mapId: id,
  );
}