addMarker method

void addMarker()

Implementation

void addMarker() async {
  _markers.clear();
  if (widget.setAddress.latitude != null && widget.setAddress.longitude != null) {
    lat = widget.setAddress.latitude;
    lng = widget.setAddress.longitude;
  }
  selectedAddress = widget.setAddress.googleAddress ?? "Choose Current Location";
  _markers.add(
    Marker(
      markerId: const MarkerId('marker_2'),
      position: LatLng(lat!, lng!),
      draggable: true,
      icon: await BitmapDescriptor.fromAssetImage(const ImageConfiguration(size: Size(40, 40)), 'assets/images/map_pin_blue.png'),
    ),
  );
}