fromJson method

  1. @override
UMessageViewEmbed fromJson(
  1. Map<String, dynamic> json
)

Implementation

@override
UMessageViewEmbed fromJson(Map<String, dynamic> json) {
  try {
    if (isRecordView(json)) {
      return UMessageViewEmbed.recordView(
        data: const RecordViewConverter().fromJson(json),
      );
    }

    return UMessageViewEmbed.unknown(data: json);
  } catch (_) {
    return UMessageViewEmbed.unknown(data: json);
  }
}