onLocationSelect function

void onLocationSelect(
  1. BuildContext context,
  2. LatLng point, {
  3. String? displayName,
  4. String? label,
})

handles the selection of a location

Implementation

void onLocationSelect(BuildContext context, LatLng point,
    {String? displayName, String? label}) {
  Navigator.push(
      context,
      MaterialPageRoute(
          builder: (context) => SelectedLocation(
                displayName ?? AllText().YOUR_LOCATION,
                point,
                label: label,
              )));
}