class BlockedServicesFromApi { final List blockedServices; BlockedServicesFromApi({ required this.blockedServices, }); factory BlockedServicesFromApi.fromJson(Map json) => BlockedServicesFromApi( blockedServices: List.from(json["blocked_services"].map((x) => BlockedService.fromJson(x))), ); } class BlockedServices { List services; BlockedServices({ required this.services }); } class BlockedService { final String id; final String name; final String iconSvg; final List rules; BlockedService({ required this.id, required this.name, required this.iconSvg, required this.rules, }); factory BlockedService.fromJson(Map json) => BlockedService( id: json["id"], name: json["name"], iconSvg: json["icon_svg"], rules: List.from(json["rules"].map((x) => x)), ); Map toJson() => { "id": id, "name": name, "icon_svg": iconSvg, "rules": List.from(rules.map((x) => x)), }; }