Untitled
unknown
plain_text
2 years ago
1.2 kB
5
Indexable
factory WorkerModel.fromJson(Map<String, dynamic> json) => WorkerModel( image: json["image"], name: json["name"], location: json["location"], experience: json["experience"], hourRate: json["hour_rate"]?.toDouble(), rating: json["rating"]?.toDouble(), ratingCount: json["rating_count"]?.toDouble(), status: json["status"], about: json["about"], strengths: List<String>.from(json["strengths"].map((x) => x)), category: json["category"], $id: json["\$id"], $createdAt: json["\$createdAt"], $updateAt: json["\$updateAt"], ); Map<String, dynamic> toJson() => { "image": image, "name": name, "location": location, "experience": experience, "hour_rate": hourRate, "rating": rating, "rating_count": ratingCount, "status": status, "about": about, "strengths": List<dynamic>.from(strengths.map((x) => x)), "category": category, "\$id": $id, "\$createdAt": $createdAt, "\$updateAt": $updateAt, };
Editor is loading...
Leave a Comment