FlutstrapButton class

Flutstrap Button Component

A customizable button with Bootstrap-inspired variants, sizes, and states.

Inheritance
Annotations

Constructors

FlutstrapButton({Key? key, VoidCallback? onPressed, VoidCallback? onLongPress, ButtonStyle? style, FocusNode? focusNode, bool autofocus = false, Clip clipBehavior = Clip.none, FSButtonVariant variant = FSButtonVariant.primary, FSButtonSize size = FSButtonSize.md, bool disabled = false, bool loading = false, Widget? child, String? text, Widget? leading, Widget? trailing, bool expanded = false})
Main constructor for FlutstrapButton
const
FlutstrapButton.primary({Key? key, required VoidCallback? onPressed, String? text})
Const constructor for primary buttons
const

Properties

autofocus → bool
final
child → Widget?
final
clipBehavior → Clip
final
disabled → bool
final
expanded → bool
final
focusNode → FocusNode?
final
hashCode → int
The hash code for this object.
no setterinherited
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
leading → Widget?
final
loading → bool
final
onLongPress → VoidCallback?
final
onPressed → VoidCallback?
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
size → FSButtonSize
final
style → ButtonStyle?
final
text → String?
final
trailing → Widget?
final
variant → FSButtonVariant
final

Methods

asDisabled() → FlutstrapButton
asEnabled() → FlutstrapButton
build(BuildContext context) → Widget
Describes the part of the user interface represented by this widget.
override
copyWith({Key? key, VoidCallback? onPressed, VoidCallback? onLongPress, ButtonStyle? style, FocusNode? focusNode, bool? autofocus, Clip? clipBehavior, FSButtonVariant? variant, FSButtonSize? size, bool? disabled, bool? loading, Widget? child, String? text, Widget? leading, Widget? trailing, bool? expanded}) → FlutstrapButton
createElement() → StatelessElement
Creates a StatelessElement to manage this widget's location in the tree.
inherited
danger() → FlutstrapButton
dark() → FlutstrapButton
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
expand() → FlutstrapButton
info() → FlutstrapButton
large() → FlutstrapButton
light() → FlutstrapButton
medium() → FlutstrapButton
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
outlineDanger() → FlutstrapButton
outlineDark() → FlutstrapButton
outlineInfo() → FlutstrapButton
outlineLight() → FlutstrapButton
outlinePrimary() → FlutstrapButton
outlineSecondary() → FlutstrapButton
outlineSuccess() → FlutstrapButton
outlineWarning() → FlutstrapButton
primary() → FlutstrapButton
secondary() → FlutstrapButton
shrink() → FlutstrapButton
small() → FlutstrapButton
success() → FlutstrapButton
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
warning() → FlutstrapButton
withLoading(bool isLoading) → FlutstrapButton

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Properties

cacheSize → int
Gets the current cache size (for debugging and monitoring)
no setter

Static Methods

clearCache() → void
Clears the style cache (useful for theme changes)