BlocxFormButtonRow<F extends BlocxBaseFormEntity<F, E>, P, E extends Enum> class

Displays a horizontal row containing a submit button and a secondary button.

The left button is a BlocxFormRegisterButton used to submit the form. The right button is an OutlinedButton that usually cancels or pops the current route.

Type parameters:

  • F: The form entity type.
  • P: The form payload type.
  • E: The form field enum type.
Inheritance

Constructors

BlocxFormButtonRow({Key? key, required BlocxFormState<F, E> formState, required String registerText, required String registerSubmittingText, VoidCallback? onSecondButtonPressed, TextStyle? registerTextStyle, RegisterButtonType registerType = RegisterButtonType.filled, VoidCallback? onRegisterPressed, ButtonStyle? submitButtonStyle, String secondButtonText = 'Cancel', ButtonStyle? secondButtonStyle, bool disablePopWhileSubmitting = false, bool disableRegisterWhenInvalid = false, double spacing = 12.0, bool expandEqually = true, double height = 40.0})
Creates a form button row.
const

Properties

disablePopWhileSubmitting → bool
Whether the secondary button should be disabled while the form submits.
final
disableRegisterWhenInvalid → bool
Whether the submit button should be disabled when validation errors exist.
final
expandEqually → bool
Whether both buttons should expand equally to fill the row.
final
formState → BlocxFormState<F, E>
Current typed form state used by BlocxFormRegisterButton.
final
hashCode → int
The hash code for this object.
no setterinherited
height → double
Height of the button row.
final
isSubmitting → bool
Whether the form is currently submitting.
no setter
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onRegisterPressed → VoidCallback?
Called when the register button is pressed.
final
onSecondButtonPressed → VoidCallback?
Called when the secondary button is pressed.
final
registerSubmittingText → String
Text shown on the register button while the form is submitting.
final
registerText → String
Text shown on the register button when the form is idle.
final
registerTextStyle → TextStyle?
Optional text style for the register button label.
final
registerType → RegisterButtonType
Visual style used by the register button.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
secondButtonStyle → ButtonStyle?
Optional style for the secondary button.
final
secondButtonText → String
Text shown on the secondary button.
final
spacing → double
Horizontal spacing between the submit and secondary buttons.
final
submitButtonStyle → ButtonStyle?
Optional style for the submit button.
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