onMapCreated method

void onMapCreated(
  1. AMapController controller
)

Implementation

void onMapCreated(AMapController controller) {
  _mapController = controller;
  if (widget.needLocate) {
    _location?.setLocationOption(AMapLocationOption());
    _location?.startLocation();
  }
}