UserMessage.fromJson constructor

UserMessage.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory UserMessage.fromJson(Map<String, dynamic> json) {
  final userMessage = _$UserMessageFromJson(json);

  if (json['scheduled_message_id'] != null) {
    userMessage.scheduledInfo = ScheduledInfo.fromJson(json);
  }
  return userMessage..set(SendbirdChat().chat); // Set the singleton chat
}