toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = <String, dynamic>{};
  json[r'id'] = id;
  if (code != null) {
    json[r'code'] = code;
  }
  if (name != null) {
    json[r'name'] = name;
  }
  if (productId != null) {
    json[r'productId'] = productId;
  }
  return json;
}