NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
pub.dev · #15 most downloaded on pub.dev
Opinionated, automatic Dart source code formatter. Provides an API and a CLI tool.
Last release 1 months ago
26 Aug 2026
Ships fairly regularly
a new release about every 6 weeks
Nearly every release is documented
notes for 58 of the last 60 stable releases
1 version withdrawn
withdrawn after publishing
12 years old
120 releases · first in 2015
Update to latest analyzer package AST API.
Update package:analyzer constraint to '>=0.33.0 <0.36.0'.
package:analyzer constraint to '>=0.33.0 <0.36.0'.* Support set literals (#751).
One column per quarter.
Add --fix-function-typedefs to convert the old typedef syntax for function types to the new preferred syntax.
--fix-function-typedefs to convert the old typedef syntax for function
types to the new preferred syntax.Add --stdin-name to specify name shown when reading from stdin (#739).
--stdin-name to specify name shown when reading from stdin (#739).--fix-doc-comments to turn /** ... */ doc comments into /// (#730).const in all metadata annotations with --fix-optional-const` (#720).Preserve whitespace in multi-line strings inside string interpolations (#711). Note! This bug means that dart_style 1.1.2 may make semantics changes t
Preserve whitespace in multi-line strings inside string interpolations (#711). Note! This bug means that dart_style 1.1.2 may make semantics changes to your strings. You should avoid that version and use 1.1.3.
Set max SDK version to <3.0.0, and adjusted other dependencies.
Don't split inside string interpolations.
Format expressions in string interpolations (#226).
Add support for "style fixes", opt-in non-whitespace changes.
: to = as the named parameter default value separator.new keywords.const keywords.Support metadata on enum cases (#688).
Support the latest release of package:analyzer.
package:analyzer.Fix another failure when running in Dart 2.
Fix cast failure when running in Dart 2.
Don't split before . if the target expression is an argument list with a trailing comma (#548, #665).
. if the target expression is an argument list with a
trailing comma (#548, #665).new/const (#652).Updated tests. No user-facing changes.
Nothing published for this version
* Support v1 of pkg/args.
pkg/args.Format multiline strings as block arguments (#570).
Support URIs in part-of directives (#615).
Support the latest version of pkg/analyzer.
pkg/analyzer.Ensure formatter throws an exception instead of introducing non-whitespace changes. This sanity check ensures the formatter does not erase user code w
Preserve type arguments in generic function-typed parameters (#613).
Nothing published for this version
Ensure space between - and -- (#170).
- and -- (#170).Handle mixed block and arrow bodied function arguments uniformly (#500).
=> bodies (#584).< when a collection is in statement position (#589).Don't discard type arguments on method calls with closure arguments (#582).
Support covariant modifier on methods.
covariant modifier on methods.Update to analyzer 0.29.3. This should make dart_style a little more resilient to breaking changes in analyzer that add support for new syntax that da…
Support generic method *parameters* as well as arguments.
Add support for assert() in constructor initializers.
is and as expressions.Widen dependency on analyzer to allow 0.29.x.
Fix test to not depend on analyzer error message.
Handle metadata annotations before parameters with trailing commas (#520).
--set-exit-if-changed to set the exit code on a change (#365).Require analyzer 0.27.4, which makes trailing commas on by default.
Nothing published for this version
Format parameter lists with trailing commas like argument lists (#447).
Put labels on their own line (#43).
Better handling for long collections with comments (#484).
Support messages in assert() (#411).
Format configured imports and exports.
--version command line argument (#240).
--version command line argument (#240).. in a method chain if the target splits (#255).=> bodies (#434.if statements without curly bodies better (#448).get and set (#462).--indent to specify leading indent (#464).Treat functions nested inside function calls like block arguments (#366).
Smarter indentation for function arguments (#369).
Optimize splitting complex lines (#391).
Allow splitting between adjacent strings (#201).
for fully split if initializers or updaters do (#375, #377).deferred (#381).as and is expressions (#384).?., ??, and ??=) (#385).BREAKING: The indent argument to new DartFormatter() is now a number of *spaces*, not *indentation levels*.
BREAKING: The indent argument to new DartFormatter() is now a number
of spaces, not indentation levels.
This version introduces a new n-way constraint system replacing the previous binary constraints. It's mostly an internal change, but allows us to fix a number of bugs that the old solver couldn't express solutions to.
In particular, it forces argument and parameter lists to go one-per-line if they don't all fit in two lines. And it allows function and collection literals inside expressions to indent like expressions in some contexts. (#78, #97, #101, #123, #139, #141, #142, #143, et. al.)
Indent cascades more deeply when the receiver is a method call (#137).
Preserve newlines in collections containing line comments (#139).
Allow multiple variable declarations on one line if they fit (#155).
Prefer splitting at "." on non-identifier method targets (#161).
Enforce a blank line before and after classes (#168).
More precisely control newlines between declarations (#173).
Preserve mandatory newlines in inline block comments (#178).
Splitting inside type parameter and type argument lists (#184).
Nest blocks deeper inside a wrapped conditional operator (#186).
Split named arguments if the positional arguments split (#189).
Re-indent line doc comments even if they are flush left (#192).
Nest cascades like expressions (#200, #203, #205, #221, #236).
Prefer splitting after => over other options (#217).
Nested non-empty collections force surrounding ones to split (#223).
Allow splitting inside with and implements clauses (#228, #259).
Allow splitting after = in a constructor initializer (#242).
If a => function's parameters split, split after the => too (#250).
Allow splitting between successive index operators (#256).
Correctly indent wrapped constructor initializers (#257).
Set failure exit code for malformed input when reading from stdin (#359).
Do not nest blocks inside single-argument function and method calls.
Do nest blocks inside => functions.
Update to latest analyzer and args packages.
analyzer and args packages.Use the new test package runner internally.
test package runner internally.Allow using analyzer 0.26.0-alpha.0.
Update to latest analyzer (#177).
Allow passing in selection to preserve through command line (#194).
Change executable name from dartformat to dartfmt.
dartformat to dartfmt.Fix test files to work in main Dart repo test runner.
Nothing published for this version
Nothing published for this version
Don't mangle comma after function-typed initializing formal (#156).
--dry-run option to show files that need formatting (#67).await for statements (#154).- calls (#170).-t flag to preserve compatibility with old formatter (#166).--machine flag for machine-readable output (#164).Split different operators with the same precedence equally (#130).
Move split conditional operators to the beginning of the next line.
Support formatting enums (#120).
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →