Button constructor
Button({
- String? id,
- required String text,
- String? url,
- ButtonStyle? style,
- EdgeInsets padding = const EdgeInsets.symmetric(horizontal: 24.0, vertical: 12.0),
- BorderRadius borderRadius = const BorderRadius.circular(6.0),
- BoxShadow shadow = const BoxShadow(offsetY: 2, blurRadius: 4, color: 'rgba(0, 0, 0, 0.1)'),
- ButtonState state = ButtonState.enabled,
- String? semanticLabel,
- bool fullWidth = false,
- ButtonSize size = ButtonSize.medium,
- String? icon,
- dynamic onClick,
- String? xData,
- String? xInit,
- String? xShow,
- Map<
String, String> ? xBind, - Map<
String, String> ? xOn, - String? xText,
- String? xHtml,
- String? xModel,
- String? xModelable,
- String? xFor,
- String? xTransition,
- String? xEffect,
- bool? xIgnore,
- String? xRef,
- bool? xCloak,
- String? xTeleport,
- bool? xIf,
- String? xId,
Creates a new Button.
Implementation
Button({
String? id,
required this.text,
this.url,
this.style,
this.padding = const EdgeInsets.symmetric(horizontal: 24.0, vertical: 12.0),
this.borderRadius = const BorderRadius.circular(6.0),
this.shadow = const BoxShadow(
offsetY: 2,
blurRadius: 4,
color: 'rgba(0, 0, 0, 0.1)',
),
this.state = ButtonState.enabled,
this.semanticLabel,
this.fullWidth = false,
this.size = ButtonSize.medium,
this.icon,
this.onClick,
super.xData,
super.xInit,
super.xShow,
super.xBind,
super.xOn,
super.xText,
super.xHtml,
super.xModel,
super.xModelable,
super.xFor,
super.xTransition,
super.xEffect,
super.xIgnore,
super.xRef,
super.xCloak,
super.xTeleport,
super.xIf,
super.xId,
}) : id = id ?? _generateId();