fromJson static method

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

Implementation

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

  return PageBlockChatLink(
    title: (json['title'] as String?) ?? '',
    photo: ChatPhotoInfo.fromJson(tdMapFromJson(json['photo'])),
    accentColorId: (json['accent_color_id'] as int?) ?? 0,
    username: (json['username'] as String?) ?? '',
  );
}