class Packages { int? status; List? data; Packages({this.status, this.data}); Packages.fromJson(Map json) { status = json['status']; if (json['data'] != null) { data = []; json['data'].forEach((v) { data!.add(Data.fromJson(v)); }); } } } class Data { String? name; String? description; int? price; Data({ this.name, this.description, this.price, }); Data.fromJson(Map json) { name = json['name']; description = json['description']; price = json['price']; } }