toJson method
avatarDataId that contain String value of Avatar Image ID
Status
is contain Integer value
type ,accountId , id is contain String value
version , order ,v is contain integer value
FrontendConfig is contains object value
AvatarConfig is contains object value
createdAt, updatedAt is contains DateTime value
Implementation
Map<String, dynamic> toJson() => {
"id": avatarDataId,
"status": status,
"type": type,
"version": version,
"order": order,
"accountId": accountId,
"frontendConfig": frontendConfig?.toJson(),
"avatarConfig": avatarConfig?.toJson(),
"variants":
variants == null ? [] : List<dynamic>.from(variants!.map((x) => x)),
"_id": id,
"createdAt": createdAt?.toIso8601String(),
"updatedAt": updatedAt?.toIso8601String(),
"__v": v,
};