FieldsDecorator constructor

FieldsDecorator({
  1. TitleFieldType? type,
  2. String? decorator,
  3. String? value,
})

Implementation

factory FieldsDecorator({
  TitleFieldType? type,
  String? decorator,
  String? value,
}) {
  if (type == null && decorator != null) {
    return FieldsDecorator.decorator(decorator);
  } else if (type == TitleFieldType.fieldsDecorator && value != null) {
    return FieldsDecorator.decorator(value);
  }
  return const FieldsDecorator._(decorator: null, type: null);
}