ExternalField constructor

ExternalField({
  1. TitleFieldType? type,
  2. String? id,
  3. String? value,
})

Implementation

factory ExternalField({
  TitleFieldType? type,
  String? id,
  String? value,
}) {
  if (type == null && id != null) {
    return ExternalField.id(id);
  } else if (type == TitleFieldType.externalField && value != null) {
    return ExternalField.id(value);
  }
  return const ExternalField._(id: null, type: null);
}