如果報如下類似錯誤
Warning! This package referenced a Flutter repository via the .packages file that is no longer available. The repository from which the 'flutter' tool is currently executing will be used instead.
running Flutter tool: /Users/xxx/Documents/flutter/flutter
previous reference : /Users/xxx/Documents/xxxx/flutter
則在AdroidStuido中terminal
用如下命令
flutter packages upgrade
即可。
如果遇到還有其它文件缺少的庫,就找到這個yaml文件,點擊右邊packages get下載下庫就可以了
2.還有一種代碼報錯解決方案
// FocusScope.of(context).reparentIfNeeded(node);
FocusScopeNode _node = node;
FocusAttachment _nodeAttachment = _node.attach(context);
_nodeAttachment.reparent();