toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
  if (quantity != null) {
    json[r'quantity'] = quantity;
  }
  if (label != null) {
    json[r'label'] = label;
  }
  return json;
}