ArcaneButton class

A styled button component.

Use style presets for cleaner code:

ArcaneButton(
  label: 'Delete',
  style: ButtonStyle.destructive,
)
Inheritance

Constructors

ArcaneButton({String? label, Component? child, Component? icon, Component? trailing, void onPressed()?, ButtonStyle? style, @Deprecated('Use style parameter instead') ButtonVariant? variant, ButtonSize size = ButtonSize.medium, bool disabled = false, bool loading = false, bool fullWidth = false, Key? key})
const
ArcaneButton.destructive({String? label, Component? child, Component? icon, Component? trailing, void onPressed()?, ButtonSize size = ButtonSize.medium, bool disabled = false, bool loading = false, bool fullWidth = false, Key? key})
Destructive button constructor
const
ArcaneButton.ghost({String? label, Component? child, Component? icon, Component? trailing, void onPressed()?, ButtonSize size = ButtonSize.medium, bool disabled = false, bool loading = false, bool fullWidth = false, Key? key})
Ghost button constructor
const
Link button constructor
const
ArcaneButton.outline({String? label, Component? child, Component? icon, Component? trailing, void onPressed()?, ButtonSize size = ButtonSize.medium, bool disabled = false, bool loading = false, bool fullWidth = false, Key? key})
Outline button constructor
const
ArcaneButton.primary({String? label, Component? child, Component? icon, Component? trailing, void onPressed()?, ButtonSize size = ButtonSize.medium, bool disabled = false, bool loading = false, bool fullWidth = false, Key? key})
Primary button constructor
const
ArcaneButton.secondary({String? label, Component? child, Component? icon, Component? trailing, void onPressed()?, ButtonSize size = ButtonSize.medium, bool disabled = false, bool loading = false, bool fullWidth = false, Key? key})
Secondary button constructor
const
ArcaneButton.success({String? label, Component? child, Component? icon, Component? trailing, void onPressed()?, ButtonSize size = ButtonSize.medium, bool disabled = false, bool loading = false, bool fullWidth = false, Key? key})
Success button constructor
const
ArcaneButton.warning({String? label, Component? child, Component? icon, Component? trailing, void onPressed()?, ButtonSize size = ButtonSize.medium, bool disabled = false, bool loading = false, bool fullWidth = false, Key? key})
Warning button constructor
const

Properties

child → Component?
Child component (alternative to label)
final
disabled → bool
Whether the button is disabled
final
fullWidth → bool
Whether to expand to full width
final
hashCode → int
The hash code for this object.
no setterinherited
icon → Component?
Leading icon
final
key → Key?
Controls how one component replaces another component in the tree.
finalinherited
label → String?
Button label text
final
loading → bool
Whether the button is loading
final
onPressed → void Function()?
Click handler
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
size → ButtonSize
Button size
final
style → ButtonStyle?
Style preset (preferred over variant)
final
trailing → Component?
Trailing icon
final
variant → ButtonVariant?
Button variant (legacy - use style instead)
final

Methods

build(BuildContext context) → Component
Describes the part of the user interface represented by this component.
override
createElement() → Element
Creates a StatelessElement to manage this component's location in the tree.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
shouldRebuild(covariant Component newComponent) → bool
Implement this method to determine whether a rebuild can be skipped.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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