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: FutureBuilder(
future: Mirrorfly.getValueFromManifestOrInfoPlist(
androidManifestKey: "com.google.android.geo.API_THUMP_KEY",
iOSPlistKey: "API_THUMP_KEY"),
builder: (context, snap) {
return CachedNetworkImage(
imageUrl: AppUtils.getMapImageUrl(locationChatMessage!.latitude,
locationChatMessage.longitude, snap.data.checkNull()),
fit: BoxFit.fill,
width: width,
height: height,
);
}));
}