toJson method Null safety
Implementation
Map<String, dynamic> toJson() => {
"id": id,
"name": name,
"childern": childern == null
? null
: List<dynamic>.from(childern!.map((x) => x.toJson())),
"listType": listType,
"imgURL": imgUrl,
"imgThumbURL": imgThumbUrl,
"hasFilter": hasFilter,
};