sendCollaborativeDocument method
dynamic
sendCollaborativeDocument(
- BuildContext context,
- String receiverID,
- String receiverType,
- CometChatTheme theme,
Implementation
sendCollaborativeDocument(BuildContext context, String receiverID,
String receiverType, CometChatTheme theme) {
CometChat.callExtension(
ExtensionConstants.document,
"POST",
ExtensionUrls.document,
{"receiver": receiverID, "receiverType": receiverType},
onSuccess: (Map<String, dynamic> map) {
debugPrint("Success map $map");
}, onError: (CometChatException e) {
debugPrint('$e');
String error = getErrorTranslatedText(context, e.code);
showCometChatConfirmDialog(
context: context,
messageText: Text(
error,
style: TextStyle(
fontSize: theme.typography.title2.fontSize,
fontWeight: theme.typography.title2.fontWeight,
color: theme.palette.getAccent(),
fontFamily: theme.typography.title2.fontFamily),
),
confirmButtonText: Translations.of(context).tryAgain,
cancelButtonText: Translations.of(context).cancelCapital,
onConfirm: () {
Navigator.pop(context);
sendCollaborativeDocument(context, receiverID, receiverType, theme);
});
});
}