Community.fromJson constructor

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

Parses a Community from TDLib JSON.

Implementation

factory Community.fromJson(Map<String, dynamic> json) => Community(
  id: _readInt(json['id']),
  haveAccess: _readBool(json['have_access']),
  name: _readString(json['name']),
  photo: _readOptional(json['photo'], ChatPhotoInfo.fromJson),
  date: _readInt(json['date']),
  status: _readObject(json['status'], CommunityMemberStatus.fromJson),
  permissions: _readObject(
    json['permissions'],
    CommunityPermissions.fromJson,
  ),
);