academind / flutter-complete-guide-course-resources

Course resources (code snapshots & slides) for our complete Flutter & Dart course (https://acad.link/flutter).
1.95k stars 833 forks source link

WillPopeScope is now deprecated. I tried using PopScope since your approach isn't working now. Below is the error I'm getting when I try navigating back to the tabs page after setting the meals filter. #18

Open sistercharmings777 opened 6 months ago

sistercharmings777 commented 6 months ago

Restarted application in 670ms. [ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: 'package:flutter/src/widgets/navigator.dart': Failed assertion: line 5238 pos 12: '!_debugLocked': is not true.

0 _AssertionError._doThrowNew (dart:core-patch/errors_patch.dart:51:61)

1 _AssertionError._throwNew (dart:core-patch/errors_patch.dart:40:5)

2 NavigatorState.pop (package:flutter/src/widgets/navigator.dart:5238:12)

3 _FiltersScreenState.build. (package:meals/screens/filters.dart:43:35)

4 ModalRoute.onPopInvoked (package:flutter/src/widgets/routes.dart:1574:30)

5 _RouteEntry.pop (package:flutter/src/widgets/navigator.dart:3083:11)

6 NavigatorState.pop (package:flutter/src/widgets/navigator.dart:5251:13)

7 NavigatorState.maybePop (package:flutter/src/widgets/navigator.dart:5204:9)