formx library
Access, build, validate, sanitize and fill forms easily with Form/Field extensions.
Classes
-
AsyncAutocomplete<
T extends Object> - An autocomplete field that builds results based on the search function.
-
AsyncAutocompleteState<
T extends Object> - The State of the AsyncAutocomplete.
-
AsyncSearch<
T extends Object> - A search field that builds results based on the search function.
-
AsyncSearchBase<
T extends Object> - The base class for async search fields.
-
AsyncSearchState<
T extends Object> - The state of the AsyncSearch widget.
-
AutocompleteFormxField<
T extends Object> -
A
FormField<T>that contains a AsyncAutocomplete widget. - CheckboxFormxField
- A FormField that contains a single CheckboxListTile.
-
CheckboxListFormxField<
T extends Object> -
A
FormField<List<T>>that builds a list of CheckboxListTile. - DateFormxField
- A FormField of type DateTime.
-
FieldKey<
T> - A Key for customizing FormxState.toMap & other outputs.
- FileFormxField
- A FormField that allows the user to pick a file.
- FileListFormxField
- A FormField that allows the user to pick multiple files.
- Formatter
- A list of TextInputFormatter.
- FormKey
- Formx
-
FormxField<
T> - An extended FormField with:
-
FormxFieldState<
T> - The state of a FormxField.
- FormxOptions
-
Global options for all
FormxStatemethods. - FormxSetup
- Global setup for all Formx widgets.
-
IndentedMap<
K, V> - An indented view of a Map.
- InputDecoratorx
- An extended InputDecorator.
-
RadioListFormxField<
T extends Object> -
A
FormField<T>that builds a list of RadioListTile. - ReCase
- An instance of text to be re-cased.
-
SearchFormxField<
T extends Object> -
A
FormField<T>that contains a AsyncAutocomplete widget. - SliderFormxField
- TimeFormxField
- A FormField of type DateTime.
- TimeTextInputFormatter
-
Validator<
T> - A class that handles the validation of a FormField.
Enums
- Separator
- The separators for FormatterExtension.currency.
Extension Types
- FormxState
- Inline-class for FormState to add syntactic sugar.
- SearchFormFieldState
- A FormFieldState that exposes the SearchFormxField instance.
Extensions
- ContextFormx on BuildContext
- Extension for BuildContext to access the main FormState.
- CountryCodeExtension on T Function({bool autocorrect, String? countryCode, bool endless})
- Shortcut to select a country.
- FiatCodeExtension on T Function({String? code, String? leading, int? mantissa, int? maxLength, void onChanged(num)?, Separator? separator, String? trailing, bool? usePadding})
- Shortcut to select a fiat code.
- FormatterExtension on Formatter
- The Formatter extension modifiers.
- FormFieldKeyExtension on Key
- Extension for Key value.
- FormFieldOptionsExtension on FormFieldState
-
FormFieldStateExtension
on FormFieldState<
T> - Extends FormFieldState with a programatic way to set errorText.
-
FormFieldStateMaybe
on FormFieldState<
T> - FormOptionsExtension on FormState
-
FormxAdaptersExtension
on Iterable<
T> - Extension for casting lists.
- FormxAlphaNumExtension on String
- Extension for String for validations.
- FormxComparableExtension on T
- Comparable extension methods.
- FormxDateExtension on DateTime
- Extension on DateTime to add more functionality.
-
FormxFormFieldKeyExtension
on GlobalKey<
FormFieldState> -
FormxFormKeyExtension
on GlobalKey<
FormState> - FormxFormStateExtension on FormState
-
FormxIndentedExtension
on Map<
K, V> - A map extension that is indented when printed.
-
FormxListExtension
on List<
T> - A list extension that removes all null or empty values.
-
FormxMapEntriesExtension
on Iterable<
MapEntry< K, V> > -
FormxMapExtension
on Map<
K, V> - A map extension that removes all null or empty values.
-
FormxNullableMapExtension
on Map<
K, V?> - FormxObjectExtensionT on T
- A set of extensions to sanitize objects.
- FormxStringCaseExtension on String
- Extension for String for case utilities.
- FormxTextEditingValueExtension on TextEditingValue
- TextEditingValue extension utilities.
- HexadecimalExtension on String
- InputDecorationExtension on InputDecoration
- JsonValidatorExtension on String
-
ListStringValidatorExtension
on List<
String> - Extension for List<String> for validations.
-
ListWidgetExtension
on List<
T> - Extension for List to keep alive its children.
-
MapSanitizerExtension
on Map<
String, dynamic> - A set of extensions to sanitize maps.
- ObjectExtension on Object
- A set of extensions to sanitize objects.
- RegexValidatorsExtension on String
- A set of extensions for String for regex validations.
- StringReCase on String
- TextInputFormatterExtension on TextInputFormatter
- Extension to format a String with a single TextInputFormatter.
- TimestampName on XFile
- Extension for XFile.
-
ValidatorExtension
on Validator<
T> - Extension for Validator to add syntactic sugar.
-
ValidatorSetError
on FormFieldState<
T>
Typedefs
-
AsyncPagedSearchCallback<
T> = Future< List< Function(int page, String query)T> > -
Signature for returning a list of items based on
queryand currentpage. -
AsyncSearchBuilder<
T> = Widget Function(BuildContext context, void onSelected(String value), T value) -
Signature for building the search results with
valueselector. -
AsyncSearchCallback<
T> = Future< List< Function(String query)T> > -
Signature for returning a list of items based on a
query. -
AsyncSearchViewBuilder<
T> = Widget Function(BuildContext context, Widget child) -
Signature for building the search view with
childresults. -
FieldAdapter<
T> = dynamic Function(T value) -
A function to adapt a
valueto any other. -
FieldPicker<
T> = Future< T> Function(FormFieldState state) - A function to pick a value for a FormField.
-
FileDeleter
= Future<
void> Function(String url) - Signature for a function that deletes a file.
-
FileUploader
= Future<
String> Function(XFile file, String? path) - Signature for a function that uploads a file.
-
FormxFieldDecorator<
T> = Widget Function(FormFieldState< T> state, Widget child) - Signature for decorating a FormxField.
- Unmasker = String? Function(String value, TextInputFormatter formatter)
-
A function to unmask a formatted
valuefrom a TextInputFormatter. -
UploaderPath
= FutureOr<
String> Function(XFile file) - Signature for a function that returns the path to upload a file.
- ValidatorModifier = String Function(String? key, String errorText)
- Signature for modifying a Validator behavior.
-
ValidatorTest<
T> = bool Function(T value) - Signature for testing a value.
Exceptions / Errors
- FormxException
- Exception thrown by FormxState when the form is invalid.