FormButtonRow<F, P, E extends Enum> class
A horizontal row of two buttons:
- A FormRegisterButton for submitting a form.
- A secondary button that pops the current route.
Features
- Equal-width layout with configurable spacing.
- Pass-through configuration for the register button (texts, type, styles).
- The secondary button can be styled; by default it's an OutlinedButton.
- Optionally disable the pop button while the form is submitting.
- Optional pre-pop callback (e.g., for analytics or side-effects).
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- BlocxStatelessWidget
- FormButtonRow
Constructors
-
FormButtonRow.new({Key? key, VoidCallback? onSecondButtonPressed, required bool isFormValid, required FormBlocState<
dynamic, Enum> formState, required String registerText, required String registerSubmittingText, RegisterButtonType registerType = RegisterButtonType.filled, VoidCallback? onRegisterPressed, ButtonStyle? submitButtonStyle, String secondButtonText = 'Cancel', ButtonStyle? secondButtonStyle, bool disablePopWhileSubmitting = false, double spacing = 12.0, bool expandEqually = true}) -
const
Properties
- disablePopWhileSubmitting → bool
-
If true, disables the pop button while the form is submitting.
final
- expandEqually → bool
-
If true, both buttons expand equally to fill the row.
final
-
formState
→ FormBlocState<
dynamic, Enum> -
Current form state used by FormRegisterButton.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isFormValid → bool
-
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- onRegisterPressed → VoidCallback?
-
Called when the register button is pressed (disabled while submitting).
final
- onSecondButtonPressed → VoidCallback?
-
final
- registerSubmittingText → String
-
Text shown on the register button while submitting.
final
- registerText → String
-
Text shown on the register button when idle.
final
- registerType → RegisterButtonType
-
Visual style for the register button.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- secondButtonStyle → ButtonStyle?
-
Optional style for the pop (secondary) button.
final
- secondButtonText → String
-
Label for the pop (secondary) button.
final
- spacing → double
-
Horizontal gap between the two buttons.
final
- submitButtonStyle → ButtonStyle?
-
final
Methods
-
build(
BuildContext context) → Widget -
Describes the part of the user interface represented by this widget.
override
-
colorScheme(
BuildContext context) → ColorScheme -
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
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
textTheme(
BuildContext context) → TextTheme -
inherited
-
theme(
BuildContext context) → ThemeData -
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, int wrapWidth = 65}) → 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