mirror of
https://github.com/DefinedNet/mobile_nebula.git
synced 2025-03-10 23:09:41 +00:00
Pop confirmation modal only for changed forms (#178)
This commit is contained in:
parent
fcf21f6f6b
commit
6d9bcc9ba1
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||||
|
|
Loading…
Add table
Reference in a new issue