Replace deprecated `onPopInvoked` with `onPopInvokedWithResult`

https://docs.flutter.dev/release/breaking-changes/popscope-with-result
This commit is contained in:
Ian VanSchooten 2024-09-03 11:32:59 -04:00
parent e2259ba8f7
commit 78a2ca8ea7
1 changed files with 2 additions and 2 deletions

View File

@ -38,9 +38,9 @@ class _FormPageState extends State<FormPage> {
Widget build(BuildContext context) { Widget build(BuildContext context) {
changed = widget.changed || changed; changed = widget.changed || changed;
return PopScope( return PopScope<Object?>(
canPop: false, canPop: false,
onPopInvoked: (bool didPop) async { onPopInvokedWithResult: (bool didPop, Object? result) async {
if (didPop) { if (didPop) {
return; return;
} }