openMap method
Implementation
Future<void> openMap(UFUAddressModel? address) async {
if (address == null) return;
try {
if (address.longitude != null && address.longitude != null) {
return await openMapWithLatLng(
address.latitude!,
address.longitude!,
label: address.completeAddress ?? "",
);
} else if (address.placeId?.isNotEmpty ?? false) {
return await openMapWithPlaceId(
address.placeId!,
label: address.completeAddress ?? "",
);
} else {
return await openMapWithAddress(address.completeAddress ?? "");
}
} catch (error) {
return await _showError(error.toString());
}
}