Add generic type for result in PopScope (#139164)

Adds a generic type and pop result to popscope and its friend.

The use cases are to be able to capture the result when the pop is called.

migration guide: https://github.com/flutter/website/pull/9872
This commit is contained in:
chunhtai
2024-04-18 12:30:10 -07:00
committed by GitHub
parent ffa3b303ee
commit 7ee05a05ff
18 changed files with 466 additions and 55 deletions

View File

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