copyWith method

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

Implementation

FlutstrapButton copyWith({
  Key? key,
  VoidCallback? onPressed,
  VoidCallback? onLongPress,
  ButtonStyle? style,
  FocusNode? focusNode,
  bool? autofocus,
  Clip? clipBehavior,
  FSButtonVariant? variant,
  FSButtonSize? size,
  bool? disabled,
  bool? loading,
  Widget? child,
  String? text,
  Widget? leading,
  Widget? trailing,
  bool? expanded,
}) {
  return FlutstrapButton(
    key: key ?? this.key,
    onPressed: onPressed ?? this.onPressed,
    onLongPress: onLongPress ?? this.onLongPress,
    style: style ?? this.style,
    focusNode: focusNode ?? this.focusNode,
    autofocus: autofocus ?? this.autofocus,
    clipBehavior: clipBehavior ?? this.clipBehavior,
    variant: variant ?? this.variant,
    size: size ?? this.size,
    disabled: disabled ?? this.disabled,
    loading: loading ?? this.loading,
    child: child ?? this.child,
    text: text ?? this.text,
    leading: leading ?? this.leading,
    trailing: trailing ?? this.trailing,
    expanded: expanded ?? this.expanded,
  );
}