Replace deprecated `onPopInvoked` with `onPopInvokedWithResult`
https://docs.flutter.dev/release/breaking-changes/popscope-with-result
This commit is contained in:
parent
e2259ba8f7
commit
78a2ca8ea7
|
@ -38,9 +38,9 @@ class _FormPageState extends State<FormPage> {
|
|||
Widget build(BuildContext context) {
|
||||
changed = widget.changed || changed;
|
||||
|
||||
return PopScope(
|
||||
return PopScope<Object?>(
|
||||
canPop: false,
|
||||
onPopInvoked: (bool didPop) async {
|
||||
onPopInvokedWithResult: (bool didPop, Object? result) async {
|
||||
if (didPop) {
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue