showUnsavedChangesDialog method
Implementation
Future<bool> showUnsavedChangesDialog(BuildContext context) async {
final result = await Dialog.messageDialog(context)
.title('Unsaved Changes')
.message('You have unsaved changes. Do you want to discard them?')
.okCancel()
.show();
return result ?? false;
}