Flutter Navigator 2.0 and Deep Links | raywenderlich.com

I am having the previous issue again. Any ideas on how to fix this?

"Has anyone else had problems with this code since upgrading to Flutter 2.2+? Suddenly after updating to null safety, my URL is not updating correctly, it’s always 1 page behind. For example, after setSplashFinished, the url still reads /splash, even though it is showing the Login screen. Then if I navigate to a new screen from Login, the URL shows /login instead of the current screen.

I think it’s because the routerDelegate currentConfiguration value isn’t updating correctly, but I cannot seem to figure it out."

I took a look at the project again and it’s getting a bit old. I had to do the following:

  1. Update Flutter SDK in pubspec.yaml to sdk: “>=2.16.2 <3.0.0”
  2. I updated all packages.
  3. In main.dart I added the following provider:
    Provider(
    lazy: false,
    create: (_) => loginState,
    ),
  4. You may need to do a flutter clear/flutter pub get to clean things up

Thank you so much for updating this! It is very much appreciated.