createLocationMessage static method
Implementation
static Object createLocationMessage(
{required String userID,
required String description,
required double latitude,
bool needReadReceipt = false,
required double longitude,
String cloudCustomData = '',
String convType = 'C2C',
int priority = 0}) {
final textParams = {
"to": userID,
"conversationType": convType,
"cloudCustomData": cloudCustomData,
"needReadReceipt": needReadReceipt,
"priority": MessagePriorityWeb.convertMsgPriorityToWeb(priority),
"payload": mapToJSObj({
"description": description,
"longitude": longitude,
"latitude": latitude
}),
};
return mapToJSObj(textParams);
}