FormCompanionPropertyDescriptorBuilderExtensions extension

Defines convinient extension methods for PropertyDescriptorsBuilder when you use FormCompanion annotation.

on

Methods

addWithField<P extends Object, F extends Object, TField extends FormField<F>>({required String name, List<FormFieldValidatorFactory<F>>? validatorFactories, List<AsyncValidatorFactory<F>>? asyncValidatorFactories, P? initialValue, Equality<F>? fieldValueEquality, Equality<P>? propertyValueEquality, ValueConverter<P, F>? valueConverter, PropertyValueTraits? valueTraits, RestorableValueFactory<F>? restorableValueFactory}) → void
Defines a new property with property value type P, form field value type F, and preferred form field type TField.
bigIntWithField<TField extends FormField<BigInt>>({required String name, List<FormFieldValidatorFactory<BigInt>>? validatorFactories, List<AsyncValidatorFactory<BigInt>>? asyncValidatorFactories, BigInt? initialValue, PropertyValueTraits? valueTraits}) → void
Defines a new property with property value type BigInt and preferred form field type TField for form field value type String.
booleanWithField<TField extends FormField<bool>>({required String name, bool initialValue = false, PropertyValueTraits? valueTraits}) → void
Defines a new property with bool for both of property value type and form field value type, and preferred form field type TField.
enumeratedWithField<T extends Enum, TField extends FormField<T>>({required String name, T? initialValue, PropertyValueTraits? valueTraits, required Iterable<T> enumValues}) → void
Defines a new property with enum type T for both of property value type and form field value type, and preferred form field type TField.
integerWithField<TField extends FormField<int>>({required String name, List<FormFieldValidatorFactory<int>>? validatorFactories, List<AsyncValidatorFactory<int>>? asyncValidatorFactories, int? initialValue, PropertyValueTraits? valueTraits}) → void
Defines a new property with property value type int and preferred form field type TField for form field value type String.
realWithField<TField extends FormField<double>>({required String name, List<FormFieldValidatorFactory<double>>? validatorFactories, List<AsyncValidatorFactory<double>>? asyncValidatorFactories, double? initialValue, PropertyValueTraits? valueTraits}) → void
Defines a new property with property value type double and preferred form field type TField for form field value type String.
stringConvertibleWithField<P extends Object, TField extends FormField<String>>({required String name, List<FormFieldValidatorFactory<String>>? validatorFactories, List<AsyncValidatorFactory<String>>? asyncValidatorFactories, P? initialValue, required StringConverter<P>? stringConverter, PropertyValueTraits? valueTraits}) → void
Defines a new property with property value type P and preferred form field type TField for form field value type String.