//TODO: this needs to match with ServiceProviderService from backend side class ServiceModel { final int? providerBranchServiceId; final dynamic providerServiceDescription; final int? serviceCategoryId; final int? serviceId; final String? serviceDescription; final String? serviceDescriptionN; final int? status; final dynamic statusText; final bool? isAllowAppointment; final int? customerLocationRange; final int? itemsCount; bool isExpanded; ServiceModel({ this.providerBranchServiceId, this.providerServiceDescription, this.serviceCategoryId, this.serviceId, this.serviceDescription, this.serviceDescriptionN, this.status, this.statusText, this.isAllowAppointment, this.customerLocationRange, this.itemsCount, required this.isExpanded, }); factory ServiceModel.fromJson(Map json) => ServiceModel( providerBranchServiceId: json["providerBranchServiceID"], providerServiceDescription: json["providerServiceDescription"], serviceCategoryId: json["serviceCategoryID"], serviceId: json["serviceID"], serviceDescription: json["serviceDescription"], serviceDescriptionN: json["serviceDescriptionN"], status: json["status"], statusText: json["statusText"], isAllowAppointment: json["isAllowAppointment"], customerLocationRange: json["customerLocationRange"], itemsCount: json["itemsCount"], isExpanded: false, ); Map toJson() => { "providerBranchServiceID": providerBranchServiceId, "providerServiceDescription": providerServiceDescription, "serviceCategoryID": serviceCategoryId, "serviceID": serviceId, "serviceDescription": serviceDescription, "serviceDescriptionN": serviceDescriptionN, "status": status, "statusText": statusText, "isAllowAppointment": isAllowAppointment, "customerLocationRange": customerLocationRange, "itemsCount": itemsCount, }; }