EasyFormSaveButton class
The builder of the button that, when pressed, causes the form fields to be saved and shows an indicator in the process of saving.
The widget has two constructors, the standard EasyFormSaveButton,
in which you can specify any widget in the child
argument as
the button content, and the EasyFormSaveButton.text constructor,
in which you can specify the text on the button.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- EasyFormSaveButton
Constructors
- EasyFormSaveButton({Key? key, required Widget child, Size indicatorSize = kIndicatorSize, EasyFormSaveButtonIndicatorBuilder? indicatorBuilder, EasyFormActionButtonBuilder? builder, EdgeInsetsGeometry padding = EasyFormActionButton.kPadding, Alignment alignment = Alignment.center, EasyFormSaveButtonLayoutBuilder? layoutBuilder})
-
Creates a widget that creates a form save button.
const
- EasyFormSaveButton.text(String text, {Size indicatorSize = kIndicatorSize, EasyFormSaveButtonIndicatorBuilder? indicatorBuilder, EasyFormActionButtonBuilder? builder, EdgeInsetsGeometry padding = EasyFormActionButton.kPadding, Alignment alignment = Alignment.center, EasyFormSaveButtonLayoutBuilder? layoutBuilder})
-
Creates a widget that creates a form save button with text as a child.
factory
Properties
- action → EasyFormButtonAction?
-
The action when the button is pressed.
finalinherited
- alignment → Alignment
-
Aligning content inside a button.
finalinherited
- builder → EasyFormActionButtonBuilder
-
Returns the button builder.
no setter
- child → Widget
-
Typically the button's label.
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- indicatorBuilder → EasyFormSaveButtonIndicatorBuilder
-
The builder of the indicator inside the button displayed
during the save process.
no setter
- indicatorSize → Size
-
Indicator size
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- layoutBuilder → EasyFormSaveButtonLayoutBuilder
-
Button content layout builder.
no setter
- lockOnSaving → bool
-
Whether to lock button press on form save.
finalinherited
- padding → EdgeInsetsGeometry
-
Padding inside a button.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
bodyBuilder(
BuildContext context, Widget child, bool isSaving, EasyFormState form) → Widget -
build(
BuildContext context) → Widget -
Describes the part of the user interface represented by this widget.
inherited
-
createElement(
) → StatelessElement -
Creates a StatelessElement to manage this widget's location in the tree.
inherited
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
handleAction(
BuildContext context, EasyFormState form) → void - Calls an action when a button is pressed.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- defaultBuilder ↔ EasyFormActionButtonBuilder
-
The default button builder, creates an ElevatedButton or CupertinoButton.filled.
You can reassign to your builder globally so that you
don't pass the builder function every time
you create a widget.
getter/setter pair
- defaultIndicatorBuilder ↔ EasyFormSaveButtonIndicatorBuilder
-
Default constructor for button indicator on save.
getter/setter pair
- defaultLayoutBuilder ↔ EasyFormSaveButtonLayoutBuilder
-
The default button content layout builder.
getter/setter pair
Constants
- kIndicatorSize → const Size
- Default indicator size