CometChatCallsException.fromMap constructor

CometChatCallsException.fromMap(
  1. dynamic map
)

Creates a CometChatCallsException from a Map. The map should contain 'code', 'message', and 'details' keys.

Implementation

factory CometChatCallsException.fromMap(dynamic map) {
  return CometChatCallsException(
    map['code'] ?? ErrorCodeConstants.codeError,
    map['message'] ?? ErrorMessageConstants.defaultErrorMessage,
    map['details'] ?? ErrorDetailConstants.defaultErrorMessage,
  );
}