DUButton class final

A focusable, interactable button. See example/ui/button.dart for usage.

Implemented types

Constructors

DUButton({required String label, bool border = true, DUITheme theme = DUITheme.defaultTheme, String? borderLabel})

Properties

border bool
Whether to draw a border frame around the button.
final
borderLabel String?
The text to render at the upper left hand corner of the border (if it's active.)
final
down bool
True while the button is being held down this frame.
getter/setter pair
fire bool
True for exactly one frame when the button is released inside its bounds.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
label String
Button label rendered inside the button.
final
rect DURect
The bounding rectangle of the element (assigned during layout).
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
theme DUITheme
Theme for consistent widget styling.
final

Methods

interact(DURuntime r) → void
Handles user interaction (mouse, keyboard, focus) for this frame.
override
layout(DURect rect) → void
Called during layout to assign the element's position and size.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
render(DURenderer p, DURuntime r) → void
Renders the element using the given painter and runtime.
override
toString() String
A string representation of this object.
inherited

Operators

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