confirmArchive static method
Implementation
static void confirmArchive(BuildContext context, VoidCallback onConfirm, {String? name}) {
final msg = name != null
? Text.rich(TextSpan(
style: TextStyle(fontSize: 14),
text: 'Do you really want to archive ',
children: [TextSpan(text: name, style: const TextStyle(fontWeight: FontWeight.bold)), const TextSpan(text: '?')],
))
: 'Do you really want to archive this item?';
show(context,
title: 'Are you sure?',
text: msg,
icon: Icons.archive_rounded,
color: context.theme.danger,
confirmButton: AlertButton(text: 'Archive', onClick: onConfirm));
}