toJson method

Map<String, Object?> toJson()

Implementation

Map<String, Object?> toJson() => {
  'key': key,
  'label': label,
  if (kind != FieldKind.text) 'kind': kind.name,
  if (primary) 'primary': true,
};