【问题标题】:flutter- !_debugLocked is not true颤动- !_debugLocked 不正确
【发布时间】:2022-01-07 20:32:18
【问题描述】:

我有这个问题,当我尝试使用导航器时会出现这个错误

[+1368632 ms] Error: Assertion failed: file:///home/saeedszz/snap/flutter/common/flutter/packages/flutter/lib/src/widgets/navigator.dart:4564:12
          !_debugLocked
          is not true

我尝试了 StackOverflow 中相关主题中的所有内容,但似乎没有一个有效 提前谢谢你

【问题讨论】:

    标签: android flutter android-studio debugging


    【解决方案1】:

    在使用 Navigator 之前添加这行代码解决了我的问题

     await Future.delayed(Duration(seconds: 1));
    

    【讨论】:

      猜你喜欢
      • 2020-12-23
      • 2021-08-26
      • 2019-09-01
      • 1970-01-01
      • 2020-10-30
      • 2020-09-09
      • 2020-02-15
      • 1970-01-01
      • 2021-10-28
      相关资源
      最近更新 更多