Data.fromJson constructor

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

Implementation

factory Data.fromJson(Map<String, dynamic> json) => Data(
      id: json["_id"],
      userId: json["userId"],
      coins: Coins.fromJson(json["coins"]),
      createdAt: DateTime.parse(json["createdAt"]),
      updatedAt: DateTime.parse(json["updatedAt"]),
      v: json["__v"],
    );