Button constructor

Button({
  1. String? id,
  2. required String text,
  3. String? url,
  4. ButtonStyle? style,
  5. EdgeInsets padding = const EdgeInsets.symmetric(horizontal: 24.0, vertical: 12.0),
  6. BorderRadius borderRadius = const BorderRadius.circular(6.0),
  7. BoxShadow shadow = const BoxShadow(offsetY: 2, blurRadius: 4, color: 'rgba(0, 0, 0, 0.1)'),
  8. ButtonState state = ButtonState.enabled,
  9. String? semanticLabel,
  10. bool fullWidth = false,
  11. ButtonSize size = ButtonSize.medium,
  12. String? icon,
  13. dynamic onClick,
  14. String? xData,
  15. String? xInit,
  16. String? xShow,
  17. Map<String, String>? xBind,
  18. Map<String, String>? xOn,
  19. String? xText,
  20. String? xHtml,
  21. String? xModel,
  22. String? xModelable,
  23. String? xFor,
  24. String? xTransition,
  25. String? xEffect,
  26. bool? xIgnore,
  27. String? xRef,
  28. bool? xCloak,
  29. String? xTeleport,
  30. bool? xIf,
  31. 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();