copyAlert method
void
copyAlert()
inherited
Copies the current alert's segment (re-copying in case the clipboard has
been overwritten since the alert appeared) and shows a ✓ Copied
confirmation on the alert line for _copiedWindow. No-op without a
copyable segment.
Implementation
void copyAlert() {
if (component.holder.state.alert?.copyText case final text?) {
copyToClipboard(text);
component.holder.state.alertCopied = true;
_alertCopiedTimer?.cancel();
_alertCopiedTimer = Timer(_copiedWindow, () {
component.holder.state.alertCopied = false;
rebuild();
});
rebuild();
}
}