class PaymentOffersModel{ int id; String name; double price; int timestmp; int delai; List authoffer; List availableacces; PaymentOffersModel( {this.id, this.name, this.price, this.timestmp, this.delai, this.authoffer, this.availableacces}); MaptoJson()=>{ "id":id, "name":name, "price":price, "timestmp":timestmp, "delai":delai, "authoffer":List.from(authoffer.map((e) => e)), "availableacces":List.from(availableacces.map((e) => e)) }; factory PaymentOffersModel.fromJson(Map json)=>PaymentOffersModel( id: json["id"], name: json["name"], price: json["price"], timestmp: json["timestmp"], delai: json["delai"], authoffer: List.from(json["authoffer"].map((x)=>x)), availableacces: List.from(json["availableacces"].map((x)=>x)), ); }