class CategoryModel { String? id; String? title; String? image; bool? publish; CategoryModel({this.id, this.title, this.image, this.publish}); CategoryModel.fromJson(Map json) { id = json['id'] ?? ''; title = json['title'] ?? ''; image = json['image'] ?? ''; publish = json['publish']; } Map toJson() { final Map data = {}; data['id'] = id; data['title'] = title; data['image'] = image; data['publish'] = publish; return data; } }