[英]Error: _AssertionError ('package:flutter/src/widgets/navigator.dart': Failed assertion: line 4893 pos 12: '!_debugLocked': is not true.)
I am new in Flutter. I face a problem about _AssertionError ('package:flutter/src/widgets/navigator.dart': Failed assertion: line 4893 pos 12: ':_debugLocked'. is not true.)
.我是 Flutter 的新手。我遇到了一个关于_AssertionError ('package:flutter/src/widgets/navigator.dart': Failed assertion: line 4893 pos 12: ':_debugLocked'. is not true.)
。 I've been looking for a way to fix this for a long time, but I still can't find a solution.很长一段时间以来,我一直在寻找解决此问题的方法,但仍然找不到解决方案。
I would be very grateful for any user help.如果有任何用户帮助,我将不胜感激。
Just add this to your code:只需将其添加到您的代码中:
Future.delayed(Duration.zero, () {
Navigator.pop(context);
});
Hope this helps you!希望这对你有帮助!
Future.delayed(const Duration(milliseconds: 10),
() {
Navigator.of(context, rootNavigator: true)
.pop();
});
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.