TCopyButton constructor
const
TCopyButton({
- Key? key,
- required String text,
- String? label,
- String? copiedLabel,
- dynamic icon,
- dynamic copiedIcon,
- TButtonType type = TButtonType.softText,
- TButtonSize size = TButtonSize.xs,
- Color? color,
- Color? copiedColor,
- String? tooltip = 'Copy to clipboard',
- String? copiedTooltip = 'Copied!',
- bool showToast = false,
- String toastMessage = 'Copied to clipboard',
- Duration resetDuration = const Duration(seconds: 2),
- VoidCallback? onCopied,
Creates a copy button.
Implementation
const TCopyButton({
super.key,
required this.text,
this.label,
this.copiedLabel,
this.icon,
this.copiedIcon,
this.type = TButtonType.softText,
this.size = TButtonSize.xs,
this.color,
this.copiedColor,
this.tooltip = 'Copy to clipboard',
this.copiedTooltip = 'Copied!',
this.showToast = false,
this.toastMessage = 'Copied to clipboard',
this.resetDuration = const Duration(seconds: 2),
this.onCopied,
});