WoFormInput<T extends Object?> class sealed

T is an optionnal type used by fields like :

  • SelectInput : T is the type of the values to choose from
Inheritance
Implementers
Annotations
  • @Freezed.new(fromJson: true, toJson: true)

Constructors

WoFormInput.boolean({required String id, bool? initialValue, @Default.new(false) bool isRequired, @notSerializable GetCustomErrorDef<bool>? getCustomError, @notSerializable void onValueChanged(bool? value)?, BooleanInputUiSettings? uiSettings})
const
factory
WoFormInput.dateTime({required String id, FlexibleDateTime? initialValue, @Default.new(false) bool isRequired, FlexibleDateTime? maxDate, FlexibleDateTime? minDate, @Default.new(false) bool submitFormOnPick, @notSerializable GetCustomErrorDef<DateTime>? getCustomError, DateTimeInputUiSettings? uiSettings})
const
factory
WoFormInput.duration({required String id, @DurationNullableConverter.new() Duration? initialValue, @Default.new(false) bool isRequired, String? startDatePath, @DurationNullableConverter.new() Duration? maxDuration, @DurationNullableConverter.new() Duration? minDuration, @notSerializable GetCustomErrorDef<Duration>? getCustomError, DurationInputUiSettings? uiSettings})
const
factory
WoFormInput.media({required String id, required MediaImportSettings importSettings, required int? maxCount, @Default.new(0) int minCount, List<Media>? initialValues, @notSerializable OnEditMediaDef? onEdit, @notSerializable GetCustomErrorForListDef<Media>? getCustomError, @notSerializable void onValueChanged(List<Media>? value)?, @Default.new(false) bool submitFormOnSelect, String? uploadPath, MediaInputUiSettings? uiSettings})
If you want to use MediaInput, provide an implementation of MediaService at the top-level of your application with a RepositoryProvider. See wo_form_service for an implementation example. Also provide a field using MediaInputUiSettings.widgetBuilder or WoFormThemeData.mediaFieldBuilder.
const
factory
WoFormInput.num({required String id, num? initialValue, @Default.new(false) bool isRequired, int? maxBound, @Default.new(0) int minBound, @notSerializable GetCustomErrorDef<num>? getCustomError, @notSerializable void onValueChanged(num? value)?, NumInputUiSettings? uiSettings})
const
factory
WoFormInput.string({required String id, String? initialValue, @Default.new(false) bool isRequired, String? regexPattern, @notSerializable SuggestionsSettings<T>? suggestionsSettings, @notSerializable GetCustomErrorDef<String>? getCustomError, StringInputUiSettings<T>? uiSettings})
const
factory

Properties

copyWith → $WoFormInputCopyWith<T, WoFormInput<T>>
Create a copy of WoFormInput with the given fields replaced by the non-null parameter values.
no setterinherited
getCustomError WoFormInputError? Function(Never, String)?
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
id String
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
uiSettings Object?
no setterinherited

Methods

export({required dynamic into, required WoFormValues values, required String parentPath, required BuildContext context}) Future<void>
override
flex(BuildContext context, {required String parentPath}) int?
This method returns the value to provide to Flexible.flex.
override
getAllInputPaths({required WoFormValues values, required String parentPath}) Iterable<String>
Returns this node absolute path followed by all its descendants absolute paths.
override
getChild({required String path, required String parentPath, required WoFormValues values}) WoFormNode<Object?>?
The path of an input is the ids of it and its parents, separated by the character '/'.
inherited
getError(dynamic value, {required String parentPath}) WoFormInputError?
getErrors({required WoFormValues values, required String parentPath, bool recursive = true}) Iterable<WoFormInputError>
override
getExportKey({required WoFormValues values, required String parentPath}) String?
override
getInitialValues({required String parentPath}) → Json
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Json
Serializes this WoFormInput to a JSON map.
inherited
toString() String
A string representation of this object.
inherited
toWidget({required String parentPath, Key? key}) Widget
override

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

fromJson(Json json) WoFormInput<Object?>
override