showDiscardChangesConfirmation static method
Shows a discard changes confirmation dialog
Returns true if user confirmed discarding, false if cancelled
Implementation
static Future<bool?> showDiscardChangesConfirmation(BuildContext context) {
const title = 'Discard Changes?';
const message =
'You have unsaved changes. Are you sure you want to discard them?';
return SavePointsDialog.show(
context,
title: title,
message: message,
icon: Icons.warning_amber_rounded,
iconColor: Colors.orange,
confirmText: 'Discard',
cancelText: 'Keep Editing',
showCancelButton: true,
);
}