fromJson static method

RichTextDateTime? fromJson(
  1. Map<String, dynamic>? json
)
override

Implementation

static RichTextDateTime? fromJson(Map<String, dynamic>? json) {
  if (json == null) {
    return null;
  }

  return RichTextDateTime(
    text: RichText.fromJson(tdMapFromJson(json['text'])),
    unixTime: (json['unix_time'] as int?) ?? 0,
    formattingType: DateTimeFormattingType.fromJson(
      tdMapFromJson(json['formatting_type']),
    ),
  );
}