【发布时间】:2021-10-12 03:05:29
【问题描述】:
我使用 Flutter sdk 版本 1.7.8 创建了项目。在我运行构建很长时间后,它在 sdk 文件中给了我错误。所以我刚刚下载了新版本的flutter sdk(2.2)。我已将环境路径更改为最新的 sdk 版本,但是当我运行项目时,它仍然给我与旧 sdk 版本相关的错误。
这是错误
/C:/flutter_windows_v1.7.8+hotfix.4-stable/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_slidable-0.4.9/lib/src/widgets/slidable.dart:786: 46:错误:找不到方法:'TypeMatcher'。 return context.ancestorStateOfType(const TypeMatcher());
尽管我在环境变量中提供了 2.2 版,但为什么会出现与 1.78 版相关的错误。
【问题讨论】: