toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
    json[r'banned'] = this.banned;
    json[r'blocked_user_ids'] = this.blockedUserIds;
    json[r'created_at'] = this.createdAt.toUtc().toIso8601String();
    json[r'custom'] = this.custom;
  if (this.deactivatedAt != null) {
    json[r'deactivated_at'] = this.deactivatedAt!.toUtc().toIso8601String();
  } else {
    json[r'deactivated_at'] = null;
  }
  if (this.deletedAt != null) {
    json[r'deleted_at'] = this.deletedAt!.toUtc().toIso8601String();
  } else {
    json[r'deleted_at'] = null;
  }
    json[r'id'] = this.id;
  if (this.image != null) {
    json[r'image'] = this.image;
  } else {
    json[r'image'] = null;
  }
  if (this.invisible != null) {
    json[r'invisible'] = this.invisible;
  } else {
    json[r'invisible'] = null;
  }
    json[r'language'] = this.language;
  if (this.lastActive != null) {
    json[r'last_active'] = this.lastActive!.toUtc().toIso8601String();
  } else {
    json[r'last_active'] = null;
  }
  if (this.name != null) {
    json[r'name'] = this.name;
  } else {
    json[r'name'] = null;
  }
    json[r'online'] = this.online;
  if (this.privacySettings != null) {
    json[r'privacy_settings'] = this.privacySettings;
  } else {
    json[r'privacy_settings'] = null;
  }
  if (this.revokeTokensIssuedBefore != null) {
    json[r'revoke_tokens_issued_before'] = this.revokeTokensIssuedBefore!.toUtc().toIso8601String();
  } else {
    json[r'revoke_tokens_issued_before'] = null;
  }
    json[r'role'] = this.role;
    json[r'teams'] = this.teams;
    json[r'updated_at'] = this.updatedAt.toUtc().toIso8601String();
  return json;
}