class Rate { String id; String name; String description; String fromTime; String toTime; int price; Rate( {this.id, this.name, this.description, this.fromTime, this.toTime, this.price,}); factory Rate.fromMap(Map map, String id) { return Rate( id: id, name: map['name'], description: map['description'], fromTime: map['from_time'], toTime: map['to_time'], price: map['price'],); } @override String toString() { return 'Rate{id:$id, name:$name,description:$description,fromTime:$fromTime,toTime:$toTime}'; } }