Failed assertion: !_debugLocked is not true when using Navigator.popUntil() in Flutter Failed assertion: !_debugLocked is not true when using Navigator.popUntil() in Flutter dart dart

Failed assertion: !_debugLocked is not true when using Navigator.popUntil() in Flutter


This can be another alternative, if you for some reason face a setState error.

navigationService.popUntil((_) => true);navigationService.navigateTo(  'authentication',);

basically i wait until the navigation finish setting everything and then call the navigateTo.