super_form library
Classes
-
CheckboxOption<
T> - A pair of value and optional label for a single checkbox.
-
CheckboxState<
T> - Encapsulates checkbox field state into a single object.
-
CheckboxSuperFormField<
T> - Base class for creating checkboxes that extends SuperFormField.
-
ContainsRule<
T> - Ensures that value contains given element.
- CustomRule
- Rule that accepts function for validating the value. The output of the function is recognized as a message.
-
DropdownSuperFormField<
T> - Regular material DropdownButton wrapped in InputDecorator that extends SuperFormField
- EmailRule
- Ensures that the value matches RFC 5322 email regular expression.
-
IsEqualRule<
T> - Ensures that value is equal to given value.
- IsIntegerRule
- Ensures that given value is or can be parsed into int.
- IsNumberRule
- Ensures that given value is or can be parsed into num.
- MaximumLengthRule
- Ensures that given String, Iterable (List, Set) or Map value length is less or equal than given length.
- MaxValueRule
- Ensures that given num value is less or equal than given max.
- MinimumLengthRule
- Ensures that given String, Iterable (List, Set) or Map value length is greater or equal than given length.
- MinValueRule
- Ensures that given num value is greater or equal than given min.
- PatternRule
- Converts value into a string via toString method and then check if it has a match against given pattern.
-
RadioOption<
T> - A pair of value and optional label for a single radio.
-
RadioState<
T> - Encapsulates radio field state into a single object.
-
RadioSuperFormField<
T> - Base class for creating radio groups that extends SuperFormField.
- RequiredRule
- Ensures that value is not null and if it is a string that it is not empty after trimming.
- SliderSuperFormField
- Regular material Slider that extends SuperFormField
- SuperForm
- SuperForm container and state manager.
- SuperFormErrorText
- Error text for a single field.
- SuperFormField
- Base widget for SuperFormFields like TextSuperFormField.
- SuperFormFieldData
- Field data
-
SuperFormFieldRule<
T> - SuperFormFieldState
- Base state for controls like TextSuperFormField.
- SuperFormState
- SuperForm state which holds all field data and can be called to modify the form.
- TextSuperFormField
- Regular material TextField that extends SuperFormField
- ValidationError
Enums
Constants
- emailPatternSource → const String
- General Email Regex (RFC 5322 Official Standard) This is still 99.9% email regex https://www.emailregex.com/
Functions
-
listTileCheckboxBuilder<
T> (BuildContext context, CheckboxState< T> state, {Color? activeColor, Color? checkColor, Color? tileColor, Widget subtitle(CheckboxOption<T> option)?, bool isThreeLine = false, bool? dense, Widget? secondary, bool selected(CheckboxOption<T> option)?, ListTileControlAffinity controlAffinity = ListTileControlAffinity.platform, bool autofocus = false, EdgeInsetsGeometry? contentPadding, ShapeBorder? shape, Color? selectedTileColor}) → Widget - Builder for CheckboxSuperFormField which builds a Column with CheckboxListTile for each CheckboxOption.
-
listTileRadioBuilder<
T> (BuildContext context, RadioState< T> state, {bool toggleable = false, Color? activeColor, Widget subtitle(RadioOption<T> option)?, bool isThreeLine = false, bool? dense, Widget? secondary, bool selected(RadioOption<T> option)?, ListTileControlAffinity controlAffinity = ListTileControlAffinity.platform, bool autofocus = false, EdgeInsetsGeometry? contentPadding, ShapeBorder? shape, Color? tileColor, Color? selectedTileColor}) → Widget - Builder for RadioSuperFormField which builds a Column with RadioListTile for each RadioOption.
Typedefs
-
CheckboxBuilder<
T> = Widget Function(BuildContext context, CheckboxState< T> state) -
RadioBuilder<
T> = Widget Function(BuildContext context, RadioState< T> state) -
SuperFormFieldBuilder<
T> = Widget Function(BuildContext context, SuperFormFieldState fieldState, SuperFormState form)