add a new PopScope.onPopWithResultInvoke widget to replace PopScope.onPopInvoke (#147016)

same as https://github.com/flutter/flutter/pull/139164, but make it a soft transition
This commit is contained in:
chunhtai
2024-04-25 21:06:11 -07:00
committed by GitHub
parent 101ff6fe7d
commit 8031a3e30c
18 changed files with 547 additions and 76 deletions

View File

@@ -111,7 +111,7 @@ class _SaveableFormState extends State<_SaveableForm> {
const SizedBox(height: 20.0),
Form(
canPop: !_isDirty,
onPopInvoked: (bool didPop) async {
onPopInvokedWithResult: (bool didPop, Object? result) async {
if (didPop) {
return;
}