copyWith method

FlintButton copyWith({
  1. String? text,
  2. String? url,
  3. ButtonStyle? style,
  4. EdgeInsets? padding,
  5. BorderRadius? borderRadius,
  6. BoxShadow? shadow,
  7. ButtonState? state,
  8. String? semanticLabel,
  9. bool? fullWidth,
  10. ButtonSize? size,
  11. String? icon,
})

Creates a copy of this button with updated properties

Implementation

FlintButton copyWith({
  String? text,
  String? url,
  ButtonStyle? style,
  EdgeInsets? padding,
  BorderRadius? borderRadius,
  BoxShadow? shadow,
  ButtonState? state,
  String? semanticLabel,
  bool? fullWidth,
  ButtonSize? size,
  String? icon,
}) {
  return FlintButton(
    text: text ?? this.text,
    url: url ?? this.url,
    style: style ?? this.style,
    padding: padding ?? this.padding,
    borderRadius: borderRadius ?? this.borderRadius,
    shadow: shadow ?? this.shadow,
    state: state ?? this.state,
    semanticLabel: semanticLabel ?? this.semanticLabel,
    fullWidth: fullWidth ?? this.fullWidth,
    size: size ?? this.size,
    icon: icon ?? this.icon,
  );
}