FieldDefinition<T> constructor

const FieldDefinition<T>({
  1. required String name,
  2. required T? getValue(
    1. JsonObject
    ),
  3. List<ValidateResource> customValidationRules = const [],
  4. Cardinality cardinality = Cardinality.singular,
  5. bool isSummary = false,
  6. bool isModifier = false,
  7. bool isReadOnly = false,
  8. int? min,
  9. int? max,
  10. String? regex,
  11. String? description,
  12. List<String> allowedStringValues = const [],
})

Creates a new instance of FieldDefinition.

Implementation

const FieldDefinition({
  required this.name,
  required this.getValue,
  this.customValidationRules = const [],
  //No min
  this.cardinality = Cardinality.singular,
  this.isSummary = false,
  this.isModifier = false,
  this.isReadOnly = false,
  this.min,
  this.max,
  this.regex,
  this.description,
  this.allowedStringValues = const [],
});