AvatarData.fromJson constructor

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

Implementation

factory AvatarData.fromJson(Map<String, dynamic> json) => AvatarData(
      avatarDataId: json["id"],
      status: json["status"],
      type: json["type"],
      version: json["version"],
      order: json["order"],
      accountId: json["accountId"],
      frontendConfig: json["frontendConfig"] == null
          ? null
          : FrontendConfig.fromJson(json["frontendConfig"]),
      avatarConfig: json["avatarConfig"] == null
          ? null
          : AvatarConfig.fromJson(json["avatarConfig"]),
      variants: json["variants"] == null
          ? []
          : List<dynamic>.from(json["variants"]!.map((x) => x)),
      id: json["_id"],
      createdAt: json["createdAt"] == null
          ? null
          : DateTime.parse(json["createdAt"]),
      updatedAt: json["updatedAt"] == null
          ? null
          : DateTime.parse(json["updatedAt"]),
      v: json["__v"],
    );