getLocationImage function
Widget
getLocationImage(
- LocationChatMessage? locationChatMessage,
- double width,
- double height, {
- bool isSelected = false,
Implementation
Widget getLocationImage(
LocationChatMessage? locationChatMessage, double width, double height,
{bool isSelected = false}) {
return InkWell(
onTap: isSelected
? null
: () async {
Uri googleUrl = MessageUtils.getMapLaunchUri(
locationChatMessage!.latitude, locationChatMessage.longitude);
AppUtils.launchWeb(googleUrl);
},
child: CachedNetworkImage(
imageUrl: AppUtils.getMapImageUrl(
locationChatMessage!.latitude, locationChatMessage.longitude),
fit: BoxFit.fill,
width: width,
height: height,
errorWidget: (ct, e, er) {
return const Center(
child: Text("Google map API_THUMP_KEY not found"),
);
},
));
}