copyWith method

TButton copyWith({
  1. TButtonTheme? theme,
  2. TWidgetTheme? baseTheme,
  3. TButtonShape? shape,
  4. TButtonType? type,
  5. TButtonSize? size,
  6. IconData? icon,
  7. String? imageUrl,
  8. Color? color,
  9. String? text,
  10. bool? loading,
  11. String? loadingText,
  12. String? tooltip,
  13. bool? active,
  14. IconData? activeIcon,
  15. Color? activeColor,
  16. Widget? child,
  17. VoidCallback? onTap,
  18. dynamic onPressed(
    1. TButtonPressOptions
    )?,
  19. ValueChanged<bool>? onChanged,
  20. Duration? duration,
  21. Duration? throttleDuration,
})

Creates a copy of the button with updated properties.

Implementation

TButton copyWith({
  TButtonTheme? theme,
  TWidgetTheme? baseTheme,
  TButtonShape? shape,
  TButtonType? type,
  TButtonSize? size,
  IconData? icon,
  String? imageUrl,
  Color? color,
  String? text,
  bool? loading,
  String? loadingText,
  String? tooltip,
  bool? active,
  IconData? activeIcon,
  Color? activeColor,
  Widget? child,
  VoidCallback? onTap,
  Function(TButtonPressOptions)? onPressed,
  ValueChanged<bool>? onChanged,
  Duration? duration,
  Duration? throttleDuration,
}) {
  return TButton(
    theme: theme ?? this.theme,
    baseTheme: baseTheme ?? this.baseTheme,
    shape: shape ?? this.shape,
    type: type ?? this.type,
    size: size ?? this.size,
    icon: icon ?? this.icon,
    imageUrl: imageUrl ?? this.imageUrl,
    color: color ?? this.color,
    text: text ?? this.text,
    loading: loading ?? this.loading,
    loadingText: loadingText ?? this.loadingText,
    tooltip: tooltip ?? this.tooltip,
    active: active ?? this.active,
    activeIcon: activeIcon ?? this.activeIcon,
    activeColor: activeColor ?? this.activeColor,
    onTap: onTap ?? this.onTap,
    onPressed: onPressed ?? this.onPressed,
    onChanged: onChanged ?? this.onChanged,
    duration: duration ?? this.duration,
    throttleDuration: throttleDuration ?? this.throttleDuration,
    child: child ?? this.child,
  );
}