toJson method

Map<String, Object?> toJson()

Implementation

Map<String, Object?> toJson() => {
  'type': type,
  if (doc != null) 'doc': doc,
  if (icon != null) 'icon': icon,
  if (version != 1) 'version': version,
  if (formerTypes.isNotEmpty) 'formerTypes': formerTypes,
  'properties': [for (final def in properties) def.toJson()],
  if (gizmo != null) 'gizmo': gizmo!.toJson(),
};