action property
Information about the service action with the chat.
If the property returns null
, then most likely the field type in the payload is String.
Try referring to the actionType property,
if this property is also null
,
then the API has not returned a field.
Implementation
Map<String, dynamic>? get action {
final actionPayload = message['action'];
if (actionPayload is String) return null;
return actionPayload;
}