toJson method
Implementation
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'_id'] = this.id;
json[r'userId'] = this.userId;
json[r'badgeId'] = this.badgeId;
json[r'fromTenantId'] = this.fromTenantId;
json[r'createdAt'] = this.createdAt.toUtc().toIso8601String();
json[r'type'] = this.type;
json[r'threshold'] = this.threshold;
json[r'description'] = this.description;
json[r'displayLabel'] = this.displayLabel;
if (this.displaySrc != null) {
json[r'displaySrc'] = this.displaySrc;
} else {
json[r'displaySrc'] = null;
}
if (this.backgroundColor != null) {
json[r'backgroundColor'] = this.backgroundColor;
} else {
json[r'backgroundColor'] = null;
}
if (this.borderColor != null) {
json[r'borderColor'] = this.borderColor;
} else {
json[r'borderColor'] = null;
}
if (this.textColor != null) {
json[r'textColor'] = this.textColor;
} else {
json[r'textColor'] = null;
}
if (this.cssClass != null) {
json[r'cssClass'] = this.cssClass;
} else {
json[r'cssClass'] = null;
}
json[r'veteranUserThresholdMillis'] = this.veteranUserThresholdMillis;
json[r'displayedOnComments'] = this.displayedOnComments;
json[r'receivedAt'] = this.receivedAt.toUtc().toIso8601String();
if (this.order != null) {
json[r'order'] = this.order;
} else {
json[r'order'] = null;
}
if (this.urlId != null) {
json[r'urlId'] = this.urlId;
} else {
json[r'urlId'] = null;
}
return json;
}