SeniorButton class
Constructors
-
SeniorButton({Key? key, bool disabled = false, required String label, required VoidCallback onPressed, bool busy = false, String? busyMessage, IconData? icon, bool outlined = false, bool danger = false, bool fullWidth = false, SeniorButtonStyle? style})
-
Creates a button with Senior Design System determinations for primary button.
The label and onPressed parameters are required.
const
-
SeniorButton.ghost({Key? key, bool disabled, required String label, required VoidCallback onPressed, bool busy, String? busyMessage, IconData? icon, bool fullWidth, SeniorButtonStyle? style})
-
Creates a button with the Senior Design System determinations for a ghost
or tertiary button.
The
label
and onPressed
parameters are required.
factory
-
SeniorButton.primary({Key? key, bool disabled, required String label, required VoidCallback onPressed, bool busy, String? busyMessage, IconData? icon, bool outlined, bool danger, bool fullWidth, SeniorButtonStyle? style})
-
Creates a button with the Senior Design system determinations for the primary button.
The
label
and onPressed
parameters are required.
factory
-
SeniorButton.secondary({Key? key, bool disabled, required String label, required VoidCallback onPressed, bool busy, String? busyMessage, IconData? icon, bool fullWidth, SeniorButtonStyle? style})
-
Creates a button with the Senior Design System determinations for a
secondary button.
The
label
and onPressed
parameters are required.
factory
Properties
-
busy
→ bool
-
Defines whether the button will be in busy or loading status.
The default value is false.
final
-
busyMessage
→ String?
-
The message that is displayed when it is in a busy state.
If it is in a busy state and the busyMessage is not informed, the label
will be displayed.
final
-
danger
→ bool
-
Defines whether the button will be in a danger state. Used to represent
more critical actions.
The default value is false.
final
-
disabled
→ bool
-
Defines if the button will be disabled.
The default value is false.
final
-
fullWidth
→ bool
-
defines whether the button will occupy all available width
The default value is false.
final
-
hashCode
→ int
-
The hash code for this object.
no setterinherited
-
icon
→ IconData?
-
An icon displayed inside the button.
final
-
key
→ Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
-
label
→ String
-
The text that is displayed inside the button.
final
-
onPressed
→ VoidCallback
-
Function that is executed when the button is pressed.
final
-
outlined
→ bool
-
Defines whether the button will be in a state where it is made up of an
outer border.
The default value is false.
final
-
runtimeType
→ Type
-
A representation of the runtime type of the object.
no setterinherited
-
style
→ SeniorButtonStyle?
-
Defines the button style.
final