Pop confirmation modal only for changed forms (#178)

This commit is contained in:
John Maguire 2024-10-11 11:34:44 -04:00 committed by GitHub
parent fcf21f6f6b
commit 6d9bcc9ba1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -39,7 +39,7 @@ class _FormPageState extends State<FormPage> {
changed = widget.changed || changed; changed = widget.changed || changed;
return PopScope<Object?>( return PopScope<Object?>(
canPop: false, canPop: !changed,
onPopInvokedWithResult: (bool didPop, Object? result) async { onPopInvokedWithResult: (bool didPop, Object? result) async {
if (didPop) { if (didPop) {
return; return;