Answer a question

Even with the CTRL+SPACE shortcut, the options I get are nowhere near relevant to the code.

I created a new file named questions.dart in the lib folder along with main.dart. In main.dart the code autocomplete works fine but in question.dart, it doesn't. Also, the syntax is not getting highlighted as well in the new file.

For questions.dart https://devpress-image.s3.cn-north-1.jdcloud-oss.com/a/6d84558028_aCHkJ.jpg

For main.dart https://devpress-image.s3.cn-north-1.jdcloud-oss.com/a/2ee3392bc5_kJ96q.jpg

Answers

Restart the Dart Analysis Server. If that doesn't work, restart your IDE.

This happens to me occasionally. I believe it's an issue with the Dart Analysis Server. Usually, restarting the Dart Analysis Server fixes it.

To restart the Dart Analysis Server. Press ctrl + shift + p. Then search look for a command called Dart: Restart Analysis Server. If it doesn't work restart your IDE.

Logo

开发云社区提供前沿行业资讯和优质的学习知识,同时提供优质稳定、价格优惠的云主机、数据库、网络、云储存等云服务产品

更多推荐