ButtonProps class
Button component properties.
Constructors
-
ButtonProps({String? label, Widget? child, Widget? icon, Widget? trailing, void onPressed()?, ButtonVariant variant = ButtonVariant.primary, ButtonSize size = ButtonSize.md, bool disabled = false, bool loading = false, bool fullWidth = false, String? id, Map<
String, String> ? attributes, String? href, bool showArrow = false}) -
const
Properties
-
attributes
→ Map<
String, String> ? -
final
- child → Widget?
-
final
- disabled → bool
-
final
- fullWidth → bool
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- href → String?
-
If provided, renders the button as an anchor tag (
<a>) instead of<button>. Useful for CTA buttons that navigate to other pages.final - icon → Widget?
-
final
- id → String?
-
final
- label → String?
-
final
- loading → bool
-
final
- onPressed → void Function()?
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- showArrow → bool
-
Whether to show an arrow indicator after the label.
Useful for CTA buttons to indicate navigation.
final
- size → ButtonSize
-
final
- trailing → Widget?
-
final
- variant → ButtonVariant
-
final
Methods
-
copyWith(
{String? label, Widget? child, Widget? icon, Widget? trailing, void onPressed()?, ButtonVariant? variant, ButtonSize? size, bool? disabled, bool? loading, bool? fullWidth, String? id, Map< String, String> ? attributes, String? href, bool? showArrow}) → ButtonProps -
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