toJson method

Map<String, Object?> toJson()

Implementation

Map<String, Object?> toJson() => {
  'type': type,
  'id': id,
  if (field != null) 'field': field,
};