InkwellButton class

A button widget with hover elevation (floating shadow) and pressed radial gradient inkwell ripple animation.

Inheritance
Implemented types

Constructors

InkwellButton({required String text, required void onPressed(), Color color1 = CharmColors.charple, Color color2 = CharmColors.hazy, Style textStyle = const Style(foreground: Colors.white, modifiers: Modifier.bold), int? width, int? height, FocusNode? focusNode, bool autofocus = false, Color? highlightBackground, Color? highlightForeground, void onFocusChange(bool)?})
Creates a new InkwellButton.

Properties

autofocus → bool
Automatically request focus on mount.
final
color1 → Color
The first color for the radial gradient.
final
color2 → Color
The second color for the radial gradient.
final
focusNode → FocusNode?
An optional external focus node.
final
hashCode → int
The hash code for this object.
no setterinherited
height → int?
Optional height constraint.
final
highlightBackground → Color?
The background color when the button is focused or hovered. If null, a lighter or darker shade of color1 will be computed automatically.
final
highlightForeground → Color?
The foreground color when the button is focused or hovered. If null, the default foreground color is used.
final
key → Key?
The optional key for this widget.
finalinherited
onFocusChange → void Function(bool)?
Called when the focus state of the button changes.
final
onPressed → void Function()
The click handler.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
text → String
The label text.
final
textStyle → Style
The style of the label text.
final
width → int?
Optional width constraint.
final

Methods

createElement() → Element
Creates an Element to manage this widget's location in the tree.
inherited
createState() → State<InkwellButton>
Creates the mutable state for this widget at a given location in the tree.
override
getIntrinsicHeight(int width) → int
Computes the intrinsic height of this widget under the given width constraint.
inherited
getIntrinsicWidth(int height) → int
Computes the intrinsic width of this widget under the given height constraint.
inherited
handleMouseEvent(MouseEvent event, int localX, int localY) → void
Translates mouse interactions to update hover and pressed states.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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