dartsublimetextformattercommand-line-tool

Is there any command line tool to format dart code?


I want to use sublime to write dart code. It has a dart plugin which can highlight the syntax, but can't format it.

I searched and found there is no plugin for sublime for now to format the dart code, so I want to find a command line tool, and invoke it from my sublime.

Is there such a tool?


Solution

  • The dart team has started to work on a code formatter inside the Analyzer package but it's still a work in progress. You can have a look at the CodeFormatter class. You can also follow the corresponding issue : Dart formatter.