Q:

Dart compiler or syntax check for command line

Is there a way to call a Dart compiler just to verify the validity of my program without running it from the command line? 
If I have a web_ui app I can call dwc, but what about a Dart library package?

A:

You can always run dart_analyzer, it's designed for this. It is actually (almost) the same code that powers the Dart Editor, so you can get syntax errors, static type warnings, deprecation warnings etc.

