CooldownActionButton constructor
CooldownActionButton({
- Key? key,
- required String label,
- required Duration remaining,
- required VoidCallback onTap,
- VoidCallback? onReady,
- bool busy = false,
- String? waitingSemanticLabel,
Implementation
CooldownActionButton({
super.key,
required this.label,
required this.remaining,
required this.onTap,
this.onReady,
this.busy = false,
this.waitingSemanticLabel,
}) {
if (label.trim().isEmpty) {
throw ArgumentError.value(label, 'label', 'must not be blank');
}
if (remaining < Duration.zero) {
throw ArgumentError.value(remaining, 'remaining', 'must be >= 0');
}
}