FlutstrapButton constructor

const FlutstrapButton({
  1. Key? key,
  2. VoidCallback? onPressed,
  3. VoidCallback? onLongPress,
  4. ButtonStyle? style,
  5. FocusNode? focusNode,
  6. bool autofocus = false,
  7. Clip clipBehavior = Clip.none,
  8. FSButtonVariant variant = FSButtonVariant.primary,
  9. FSButtonSize size = FSButtonSize.md,
  10. bool disabled = false,
  11. bool loading = false,
  12. Widget? child,
  13. String? text,
  14. Widget? leading,
  15. Widget? trailing,
  16. bool expanded = false,
})

Main constructor for FlutstrapButton

Implementation

const FlutstrapButton({
  super.key,
  this.onPressed,
  this.onLongPress,
  this.style,
  this.focusNode,
  this.autofocus = false,
  this.clipBehavior = Clip.none,
  this.variant = FSButtonVariant.primary,
  this.size = FSButtonSize.md,
  this.disabled = false,
  this.loading = false,
  this.child,
  this.text,
  this.leading,
  this.trailing,
  this.expanded = false,
})  : assert(child != null || text != null,
          'Either child or text must be provided'),
      super();