copyWith method

TButton copyWith({
  1. TButtonType? type,
  2. MaterialColor? color,
  3. TButtonSize? size,
  4. bool? block,
  5. bool? loading,
  6. String? loadingText,
  7. IconData? icon,
  8. String? text,
  9. String? tooltip,
  10. dynamic onPressed(
    1. TButtonPressOptions
    )?,
  11. bool? active,
  12. double? width,
  13. double? height,
  14. Widget? child,
  15. OutlinedBorder? shape,
})

Implementation

TButton copyWith({
  TButtonType? type,
  MaterialColor? color,
  TButtonSize? size,
  bool? block,
  bool? loading,
  String? loadingText,
  IconData? icon,
  String? text,
  String? tooltip,
  Function(TButtonPressOptions)? onPressed,
  bool? active,
  double? width,
  double? height,
  Widget? child,
  OutlinedBorder? shape,
}) {
  return TButton(
    type: type ?? this.type,
    color: color ?? this.color,
    size: size ?? this.size,
    block: block ?? this.block,
    loading: loading ?? this.loading,
    loadingText: loadingText ?? this.loadingText,
    icon: icon ?? this.icon,
    text: text ?? this.text,
    tooltip: tooltip ?? this.tooltip,
    onPressed: onPressed ?? this.onPressed,
    active: active ?? this.active,
    width: width ?? this.width,
    height: height ?? this.height,
    shape: shape ?? this.shape,
    child: child ?? this.child,
  );
}