A code editing toolkit for Flutter.
The global parseString() function in the analyzer package returns structure data for given code, including line count, errors, and an AST that's available in what's called a CompilationUnit.
parseString()
analyzer
CompilationUnit