formx 0.36.0
formx: ^0.36.0 copied to clipboard
Access, build, format, validate, sanitize and fill forms easily with Form/Field extensions.
Changelog #
0.36.0 - Jun 16, 2025 #
- Upgraded
DateFormxField
. Now editable. - Added
TimeFormxField
. - Added
FormxConfig.timePicker
. - Added
FormatterExtension.time
. - Added
FormFieldState.time
.
0.35.0 - Jun 13, 2025 #
- Added
SliderFormField
. - Fixed
FormxState.visit
, key now correctly visits nested forms. - Improved
FormxField
enabled state handling. - Renamed all library fields to
FormxField
for consistency.
0.34.1 - Jun 12, 2025 #
- Added
Formx.submit
. - Added
Formx.trySubmit
. - Added
Formx.rawValues
. - Added
Formx.errorTexts
. - Added
Formx.clear
. - Added
FormFieldStateExtension.clear
.
0.34.0 - Jun 10, 2025 #
- Breaking change: visiting a form explicitly requires a
Key
value. - Fixed missing
enabled
state in fields. - Introduces
Formx
experimental api.
0.33.1 - Apr 23, 2025 #
- Relaxed assertion on
Formx.visit
.
0.33.0 - Mar 25, 2025 #
- Renamed
FormKey.value
toFormKey.key
. - Renamed
FieldKey.value
toFieldKey.key
. - Renamed
FormxField.errorBuilder
toviewErrorBuilder
. - Renamed
FormxField.emptyBuilder
toviewEmptyBuilder
.
0.32.0 - Mar 21, 2025 #
- Added
FormKey
, shorthand forGlobalKey<FormState>
with key value. - Fixes
FieldKey
usingKey.value
identity instead ofKey
. - Improved
FieldKey
type assertions.
0.31.0 - Mar 07, 2025 #
- Now
context.formx
&context.field
are 0(1) on consecutive calls. - Now consecutive visits are cached.
- Now it's possible to refine a visit. Ex:
context.field('address.street')
. - Added assertion for duplicate [Form.key] & [FormField.key].
- Fix mismatch type exception when using validators.
- Updated README.
- Added tests.
0.30.0 - Feb 28, 2025 #
- Improved
context.field
visitors. - Improved
FormFieldState.date
to includeMaterialLocalizations.parseCompactDate
. - Fixed wrong formatting when unmasking.
- Fixed
FieldKey.adapter
overriding default when null. - Added
FieldKey.adapter
asserts. - Added widget tests.`
- Changed min sdk constraints to Dart 3.3.0 & Flutter 3.19.0.
0.29.1 - Dec 10, 2024 #
- Added
Comparable
extensions. - Added async
Autocomplete
/Search
fields.
0.29.0 - Dec 09, 2024 #
- Added
SearchFormField.errorBuilder
. - Added
SearchFormField.emptyBuilder
. - Added
AutocompleteFormField.errorBuilder
. - Added
AutocompleteFormField.emptyBuilder
. - Added
Iterable.orderedBy
. - Exported
FormxField
. - Removed
image_picker
dependency. - Moved to formx/formx monorepo.
0.28.0 - Dec 05, 2024 #
- Added
Separator
enum forFormatterExtension.currency/pos
. - Removed
multi_input_formatter
dependency. - Removed
dartx
dependency. - Removed all dependency assets.
- Updated docs & README.
0.27.0 - Nov 13, 2024 #
- Improved
FormxField
widgets. - Removed
FormxField.isRaw
. - Added
InputDecoratorx
. - Added
FormxField.buildDecorator
. - Added
DateFormField.firstDate
andDateFormField.lastDate
. - Improved
FormxSetup
default datePicker.
0.26.0 - Nov 10, 2024 #
- Added
Validator.enabled
to enable/disable a validator. - Added enabled to
Validator.or/and
. - Added
45 dn].cpfCnpj
. - Added
FormxContextExtension.fill
. - Renamed
isRequired
torequired
inValidator
. - Removed
FromMapExtension.of/maybeOf
. - Removed
orTest
. - Updated docs.
0.25.0 - Nov 8, 2024 #
- Improved
FormxState.debug
messages. - Improved
FormxState.visit
. - Added
keys
parameter toFormxState.visit
. - Added
keys
parameter toFormxState.submit/trySubmit/toMap
. - Added
keys
parameter toBuildContext.submit/trySubmit
. - Added
OrValidator
class. - Added
Validator.addValidator
. - Added
Validator.or
modifier. - Added
Validator.orTest
modifier. - Added
Map.nonNulls
. - Added
Iterable<MapEntry>.toMap
. - Added
Iterable<MapEntry>.keys
. - Added
Iterable<MapEntry>.values
. - Added
Map.keysWhere
. - Added
Map.valuesWhere
.
0.24.1 - Nov 6, 2024 #
- Added
FileListFormField.initialValue
to saved files.
0.24.0 - Nov 6, 2024 #
- Added
FormFieldState.submit
andFormFieldState.trySubmit
. - Added
FormxException.errorMessage
for custom messages. - Added
errorMessage
to all formx/fieldsubmit
. - Added
ImageListFormField.url
default decoration. - Added
FormxDateExtension.hasPassed
.
0.23.1 - Nov 5, 2024 #
- Added singnature parameters to
ImageFormField.url
constructors. - Added
imageDeleter
&imageUploader
toFormxSetup
. - Simplified
Unmasker
signature. - Removed
adaptedValue
. UsetoValue
.
0.23.0 - Nov 5, 2024 #
- Added
ImageFormField
fields. - Added
imagePicker
/imagesPicker
toFormxOptions
.
0.22.0 - Nov 5, 2024 #
- Added
Formatter
class. - Added
FormatterExtension
& many modifiers. - Simplified
FormxOptions
customizations. - Improved
.submit
to reach nested fields. - Improved
.fill
to format text fields. - Removed
mask_text_input_formatter
. - Removed
string_validators
dependency. - Removed
material_file_icon
dependency. - Removed all deprecations.
- Added test utils.
0.21.0 - Oct 28, 2024 #
- Added
FormxField
andFormxFieldState
interfaces. - Major refactor.
0.20.4 - Oct 25, 2024 #
- Added
onChanged
to allFileFormField
. - Added
CircularProgressIndicator
to allFileFormField
when picking/uploading.
0.20.2 - Oct 24, 2024 #
- Fixed exception on
FileFormFeild
deleter. - Added
XFile.timestampName
. - Added
XFile.extension
.
0.20.1 - Oct 23, 2024 #
- Fixed
InputDecorator
empty state.
0.20.0 - Oct 23, 2024 #
- Added
Map.pairs
extension. - Added
Validator.state
getter. - Added
Validator.testState
extension. - Added
Validator.equalsField
extension. - Fixed
FileFormField
deleter call order. - Optimized formx/field visitors & to not use dependsOn.
- Optimized field widgets that use
InputDecorator
& added hover, empty and focus interactions. - Optimized
castJson()
andmapJson()
to work on any Iterable. - Removed
FormxOptions.defaultTitle
deprecation. UseFormxSetup.defaultTitle
.
0.19.1 - Oct 22, 2024 #
- Added
FormFieldState.valueAdapted
. - Fixed
FieldKey.unmask
apply on the entire map instead of just the value. - Deprecates
FieldKey
extensions. UseKey.options
instead.
0.19.0 - Oct 20, 2024 #
- Added
BuildContext.submit
. - Added
BuildContext.trySubmit
. - Added
Formx.submit
. - Added
Formx.trySubmit
. - Added
FormxStringExtension.initials
. - Added
FormxFromMapExtension
:of
&maybeOf
. - Added
FormxException
. - Improve
FileListFormField.url
upload. - Changes
ListFormField
to useInputDecoration.suffix
instead ofsuffixIcon
, so you can change the suffix icon.
0.18.1 - Sep 29, 2024 #
- Added adapter support to
Form.key
.
0.18.0 - Sep 29, 2024 #
- Removed old deprecations.
- Deprecates
.values
and.customValues
. Unified to.toMap()
. - Added
FormxSetup
class to configure Formx widgets. - Added
FileFormField
widgets. - Added
material_file_icon
forFileFormField
s. - Added
FormFieldStateExtension.isInitial
. - Improved
FormState.isInitial
performance. - Updated examples and README.
0.17.2 - Ago 9, 2024 #
- Added
adapter
extension forList
.
0.17.1 - Ago 5, 2024 #
- Updated docs & linting.
0.17.0 - Jul 31, 2024 #
- Added
FormxOptions.defaultTitle
. Which applies a default String title for all collection fields.
0.16.3 - Jul 19, 2024 #
- Added
Key.adapt
, shorthand for adding an adapter.
0.16.2 - Jul 2, 2024 #
- Added
FormxOption.enumAdapter
to format enum inFormState.values
.
0.16.1 - Jun 28, 2024 #
- Improved
FieldKey
class null safety. - Added
Key.list<T>
extension. - Added
FieldKey<T>.toMap
adapter. - Added
FieldKey<T>.toJson
adapter. - Added
FieldKey<List<T>>.map
adapter. - Added
FieldKey<Enum>.toName
adapter. - Added
FieldKey<Enum>.toIndex
adapter. - Added
FieldKey<String>.toColor
adapter.
0.16.0 - Jun 27, 2024 #
- Added
FieldKey
class andKey
adapter & modifiers extensions. - Make
unmask
feature independant ofmask_text_input_formatter
internal state. - Deprecated all field apis inside
FormState
. Usecontext.field
instead. - Added
DateFormField
widget. - Added
FormxOption.dateAdapter
to format date inFormState.values
.
0.15.0 - Jun 24, 2024 #
- Added
FormxOptions
class. - Added
Formx.options
static variable. - Added
FormState.rawValues
getter. - Updated
FormState.values
getter. - Added
FormState.customValues
method. - Added
FormState.debug
method. - Added
context.debugForm
method extension. - Added
IndentedMap.of
factory constructor. - Included
mask_text_input_formatter
. - Updated docs & README.
0.14.0 - Jun 21, 2024 #
- Added
RadioListFormField
.
0.13.0 - Jun 19, 2024 #
- Added
CheckboxFormField
. - Added
CheckboxListFormField
. - Bump
string_validator
to 1.1.0.
0.12.2 - May 22, 2024 #
- Added
List.mapJson
extension.
0.12.1 - May 22, 2024 #
- Improved sanitizers and validators.
0.11.0 - May 2, 2024 #
- Added
Validator.translator
for translating error messages. - Removed
Validator.modifier
.
Thanks to lizandraquaresma
for the translator
feature!
0.10.4 - Apr 25, 2024 #
- Added several
Validator
extensions. - Updated
Map.clean
and addedMap.cleaned
extension. - Updated
README.md
. - Updated tests.
0.10.1 - Apr 24, 2024 #
- Refactor: removed all
if case when
as they're not working on flutter web.
0.10.0 - Apr 23, 2024 #
Breaking Update.
- Removed
Formx
widget in favor ocontext.formx()
. - Added new
README.md
.
0.9.2 - Mar 25, 2024 #
- Added
Validator.test
shorthand constructor with positional parameters. - Added
Map.clean
extension to remove null and empty values. - Fixed
FormState.setErrorText
that was never reseting on validation. - Changed
FormState.setErrorText
to accept null to remove the errorText. - Updated examples and README.
0.9.1 - Mar 22, 2024 #
- Fixed validation priority order.
0.9.0 - Mar 21, 2024 #
- Changed
FormxBuilder
typedef to followFormFieldBuilder
signature from Flutter. - Added
FormxCastExtension
withcast
andtryCast
.
0.8.0 - Feb 24, 2024 #
Validator
was cleaned up and simplified. Now it's a declarative class that can be used to create custom validators.
- Added
validators
property toValidator
class. - Removed
Validator.merge
constructor, useValidator.validators
instead. - Removed
Validator
modifiers to make it excluively declarative. UseValidator.validators
instead.
0.7.1 - Feb 12, 2024 #
- Added
Validator
class to simplify the creation of custom validators. - Added
Validator.modifier
to modify the errorText of a validator. - Added
FormFieldState.setErrorText
to seterrorText
programmatically. - Added smart AutovalidateMode to Formx. If null, starts with
AutovalidateMode.disabled
and changes toAutovalidateMode.always
when validated. - Added smart operators to FormxState, to get and set fields/nesteds.
- Added reset to FormxState, to reset all fields to their initial values.
0.7.0 - Feb 10, 2024 #
Completely simplification of the library. Now Formx works with any FormField
Widget! No need to use custom fields anymore. You can use TextFormField
, DropdownButtonFormField
or wrap/extend any widget to a FormField
. Just add a key to it and you are good to go!
- Removed
TextFormxField
,TextFormxFieldState
and it's extensions.
We realized that using extensions and callback modifiers was misleading users to use only the "new" approach. Which introduces unnecessaries new api's. We want to make it easier for developers to use Formx, as well as for others to understand it.
- Removed
errorTextModifier
,fieldModifier
,fieldWrapper
,decorator
,fieldWrapper
,fieldModifier
andvalueModifier
callbacks.
Formx is now a single widget that manages fields and their states.
0.6.1 - Jan 30, 2024 #
- Changes
TextFormxField
tag to named parameter. - Adds
FormxState.field
to get a field value by tag, no matter how deep it is. - Adds
Formx.builder
parameter for context and state access. - Added
TextFormxFieldState.hasInteractedByUser
, same asFormFieldState.hasInteractedByUser
. - Removed
Formx.at
. - Changed
decorationModifier
todecorator
.
0.5.1 - Jan 23, 2024 #
- Added
Formx.disableValidatorsOnDebugMode
to disable validators on debug mode. - Added
suffixIcon
extension toTextFormxFieldModifiers
. - Added
prefixIcon
extension toFormxFieldModifiers
.
0.5.0 - Nov 13, 2023 #
- Added
FormxField
andFormxFieldState
abstract interfaces.- Updated [FormxState.validate] you can validate by tag, tags, key or keys.
- Added [FormxState.setValue].
- Added [FormxState.didChange].
- Removed fieldKey param, use key directly with
FormxFieldState
for GlobalKey type. - Removed FormxException. AssertErrors will be thrown instead, for best practices.
- Changes
TextFormxFieldModifiers.obscure
, which now also makes the field required. - Added
complex_structure
example. - Added
page_view
example.
0.4.0 - Nov 07, 2023 #
-
Adds [Formx.valueModifier] and updates [FormxState.form] getter.
-
Adds [FormxState.save] and [Formx.onSaved] callback.
-
Adds [FormxState.reset].
-
Adds [FormxState.isValid].
-
Adds [FormxState.hasError].
-
Changes
onWidget
tofieldWrapper
. -
Changes
onField
tofieldModifier
. -
Changes
onDecoration
todecorationModifier
. -
Changes
onErrorText
toerrorTextModifier
. -
Updates in code were made to better follow Effective Dart style and also improve developer experience:
- Adds
all_lint_rules.yaml
. - Updates
analysis_options
for stricter lints. - Updates CHANGELOG style.
- Adds
0.3.13 - Oct 23, 2023 #
- Bump to Flutter sdk 3.13.0.
- Adds support to TextFormField in sdk 3.13.0.
- Adds
undoController
to TextFormxField. - Adds
onAppPrivateCommand
to TextFormxField. - Adds
cursorOpacityAnimates
to TextFormxField. - Adds
selectionHeightStyle
to TextFormxField. - Adds
selectionWidthStyle
to TextFormxField. - Adds
dragStartBehavior
to TextFormxField. - Adds
contentInsertionConfiguration
to TextFormxField. - Adds
clipBehavior
to TextFormxField. - Adds
scribbleEnabled
to TextFormxField. - Adds
canRequestFocus
to TextFormxField.
0.3.10 - Oct 23, 2023 #
- Bump to Flutter sdk 3.10.0.
- Adds support to TextFormField in sdk 3.10.0.
- Adds
spellCheckConfiguration
to TextFormxField. - Adds
magnifierConfiguration
to TextFormxField.
0.3.7 - Oct 23, 2023 #
- Bump to Flutter sdk 3.7.0.
- Adds support to TextFormField in sdk 3.7.0.
- Adds
contextMenuBuilder
to TextFormxField. - Adds
onTapOutside
to TextFormxField.
0.3.0 - Oct 23, 2023 #
- Adds support to TextFormField in sdk 3.0.0
- Adds FormxState.fill() method to autofill all nested fields.
- Adds Formx.at(context) and
maybeAt
to access state below context. - Adds
Formx.errorTexts
to access allerrorTexts
by fieldtag
. - Updates
FormxException
with errorTexts parameter.
0.1.5 - Sep 26, 2023 #
- Fixes initialValue conflict with TextEditingController.
- Fixes unnecessary didChange on setField.
0.1.1 - Sep 23, 2023 #
- Fixes minor conflict with [onField].
0.1.0 - Sep 22, 2023 #
- Initial pre-release.