fromJson static method

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

Implementation

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

  return SharedChat(
    chatId: (json['chat_id'] as int?) ?? 0,
    title: (json['title'] as String?),
    username: (json['username'] as String?),
    photo: Photo.fromJson(tdMapFromJson(json['photo'])),
  );
}