InkwellButton class

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

Inheritance

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})
Creates a new InkwellButton.

Properties

color1 Color
The first color for the radial gradient.
final
color2 Color
The second color for the radial gradient.
final
hashCode int
The hash code for this object.
no setterinherited
height int?
Optional height constraint.
final
key Key?
The optional key for this widget.
finalinherited
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
handleMouseEvent(MouseEvent event, int localX, int localY) → void
Translates mouse interactions to update hover and pressed states.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
render(Buffer buffer, Rect area) → void
Renders the widget onto the provided buffer within the specified area.
inherited
toString() String
A string representation of this object.
inherited

Operators

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