showUnsavedChangesDialog method

Future<bool> showUnsavedChangesDialog(
  1. BuildContext context
)

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;
}