toJson method
Implementation
Map<String, dynamic> toJson() => {
'name': name,
'type': type,
if (itemType != null) 'itemType': itemType,
if (unit != null) 'unit': unit,
if (description != null) 'description': description,
};