CardButton class
Advanced button widget for cards
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- CardButton
Constructors
- CardButton.new({Key? key, String? text, IconData? icon, bool iconOnRight = false, CardButtonStyle style = CardButtonStyle.elevated, ButtonPosition position = ButtonPosition.left, Color? backgroundColor, Color? textColor, Color? borderColor, double borderWidth = 1.5, double? fontSize, FontWeight? fontWeight, EdgeInsetsGeometry? padding, double? borderRadius, BorderRadiusGeometry? customBorderRadius, double? width, double? height, double iconSize = 20.0, double iconTextSpacing = 8.0, double elevation = 2.0, double pressedElevation = 6.0, bool enableHover = true, Color? hoverColor, bool isLoading = false, Color? loadingColor, bool isDisabled = false, Color? disabledColor, VoidCallback? onPressed, VoidCallback? onLongPress})
-
const
Properties
- backgroundColor → Color?
-
Background color
final
- borderColor → Color?
-
Border color (for outlined style)
final
- borderRadius → double?
-
Button border radius
final
- borderWidth → double
-
Border width
final
- customBorderRadius → BorderRadiusGeometry?
-
Custom border radius
final
- disabledColor → Color?
-
Disabled color
final
- elevation → double
-
Button elevation (for elevated style)
final
- enableHover → bool
-
Enable hover effects
final
- fontSize → double?
-
Font size
final
- fontWeight → FontWeight?
-
Font weight
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- height → double?
-
Button height
final
- hoverColor → Color?
-
Hover color
final
- icon → IconData?
-
Button icon
final
- iconOnRight → bool
-
Icon position relative to text
final
- iconSize → double
-
Icon size
final
- iconTextSpacing → double
-
Spacing between icon and text
final
- isDisabled → bool
-
Disabled state
final
- isLoading → bool
-
Loading state
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- loadingColor → Color?
-
Loading indicator color
final
- onLongPress → VoidCallback?
-
Callback when button is long pressed
final
- onPressed → VoidCallback?
-
Callback when button is pressed
final
- padding → EdgeInsetsGeometry?
-
Button padding
final
- position → ButtonPosition
-
Button position
final
- pressedElevation → double
-
Elevation when pressed
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- style → CardButtonStyle
-
Button style
final
- text → String?
-
Button text
final
- textColor → Color?
-
Text color
final
- width → double?
-
Button width (overrides position if provided)
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → _CardButtonState -
Creates the mutable state for this widget at a given location in the tree.
override
-
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
-
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