toJson method Null safety
Implementation
Map<String, dynamic> toJson() => {
"id": id,
"name": name,
"description": description,
"itemType": itemType,
"code": code,
"items": items == null
? null
: List<dynamic>.from(items!.map((x) => x.toJson())),
};