copyWith method
TButton
copyWith({
- TButtonTheme? theme,
- TWidgetTheme? baseTheme,
- TButtonShape? shape,
- TButtonType? type,
- TButtonSize? size,
- dynamic icon,
- String? imageUrl,
- Color? color,
- String? text,
- bool? loading,
- String? loadingText,
- String? tooltip,
- bool? active,
- dynamic activeIcon,
- Color? activeColor,
- (double, double)? turns,
- bool? showTick,
- Alignment? tickAlignment,
- Widget? tickWidget,
- dynamic badge,
- Alignment? badgeAlignment,
- Color? badgeColor,
- Color? badgeTextColor,
- Widget? child,
- VoidCallback? onTap,
- dynamic onPressed()?,
- ValueChanged<
bool> ? onChanged, - Duration? duration,
- Duration? throttleDuration,
- Gradient? gradient,
- double? elevation,
- Color? shadowColor,
- String? semanticLabel,
- String? semanticIdentifier,
- Object? permission,
- TAuthMode? onDenied,
Creates a copy of the button with updated properties.
Implementation
TButton copyWith({
TButtonTheme? theme,
TWidgetTheme? baseTheme,
TButtonShape? shape,
TButtonType? type,
TButtonSize? size,
dynamic icon,
String? imageUrl,
Color? color,
String? text,
bool? loading,
String? loadingText,
String? tooltip,
bool? active,
dynamic activeIcon,
Color? activeColor,
(double initial, double active)? turns,
bool? showTick,
Alignment? tickAlignment,
Widget? tickWidget,
dynamic badge,
Alignment? badgeAlignment,
Color? badgeColor,
Color? badgeTextColor,
Widget? child,
VoidCallback? onTap,
Function(TButtonPressOptions)? onPressed,
ValueChanged<bool>? onChanged,
Duration? duration,
Duration? throttleDuration,
Gradient? gradient,
double? elevation,
Color? shadowColor,
String? semanticLabel,
String? semanticIdentifier,
Object? permission,
TAuthMode? onDenied,
}) {
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,
turns: turns ?? this.turns,
showTick: showTick ?? this.showTick,
tickAlignment: tickAlignment ?? this.tickAlignment,
tickWidget: tickWidget ?? this.tickWidget,
badge: badge ?? this.badge,
badgeAlignment: badgeAlignment ?? this.badgeAlignment,
badgeColor: badgeColor ?? this.badgeColor,
badgeTextColor: badgeTextColor ?? this.badgeTextColor,
onTap: onTap ?? this.onTap,
onPressed: onPressed ?? this.onPressed,
onChanged: onChanged ?? this.onChanged,
duration: duration ?? this.duration,
throttleDuration: throttleDuration ?? this.throttleDuration,
gradient: gradient ?? this.gradient,
elevation: elevation ?? this.elevation,
shadowColor: shadowColor ?? this.shadowColor,
semanticLabel: semanticLabel ?? this.semanticLabel,
semanticIdentifier: semanticIdentifier ?? this.semanticIdentifier,
permission: permission ?? this.permission,
onDenied: onDenied ?? this.onDenied,
child: child ?? this.child,
);
}