initCamera method
void
initCamera(})
------------------------/// FUNCTION SECTIONS /// ------------------------/// Function to initialize camera
Implementation
///Function to initialize camera
void initCamera(bool autoEditMode, bool? pointDist,
{LatLng? targetCameraPosition, bool? dragMarker}) async {
if (targetCameraPosition != null) {
_sourceLocation = targetCameraPosition;
} else {
///Get current locations
await initLocation();
}
///Set current location to camera
_cameraPosition = CameraPosition(
zoom: cameraZoom,
bearing: cameraBearing,
tilt: cameraTilt,
target: sourceLocation!,
);
///Auto mode on
if (autoEditMode) {
_isEditMode = !_isEditMode;
}
///Enable or Disable point distance
if (pointDist == false) {
_pointDistance = false;
}
if (dragMarker != null) {
_enableDragMarker = dragMarker;
}
notifyListeners();
}