GetUserLocation function

Future GetUserLocation({
  1. dynamic latitude,
  2. dynamic longitude,
})

Implementation

Future GetUserLocation({latitude, longitude}) async {
  List placemarks = await placemarkFromCoordinates(latitude, longitude);
  Placemark place = placemarks[0];
  MapDetails = place.toJson();
  latDestMap = latitude;
  longDestMap = longitude;
}