Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
有没有办法调用 Dart 编译器来验证我的程序的有效性而不从命令行运行它?
如果我有一个 web_ui 应用程序,我可以调用 dwc,但是 Dart 库包呢?
您可以随时运行dart_analyzer,它就是为此而设计的。它实际上(几乎)是驱动 Dart 编辑器的相同代码,因此您可能会收到语法错误、静态类型警告、弃用警告等。
dart_analyzer