OfferModel.fromJson constructor
Implementation
factory OfferModel.fromJson(Map<String, dynamic> json) {
return OfferModel(
id: json['id'],
name: OfferName.fromValue(json['name']),
price: json['price'],
credit: json['credit'],
createdAt: DateTime.parse(json['createdAt']),
);
}