dart_style
dart_style copied to clipboard
An opinionated formatter/linter for Dart code
This is the test code ```dart import 'package:flutter/material.dart'; void main() { runApp(const MyApp()); } class MyApp extends StatelessWidget { const MyApp({super.key}); @override Widget build(BuildContext context) { return Center( child: Row(...
Hey @munificent is it possible to allow configuration of dartfmt line length in pubspec.yaml or some other common project configuration file? Of the last 5 flutter packages I've pulled down...
# before ```dart void main() async { (await { 'asdf': 'fdsa', }.toString()) .foo(bar('baz'),); } ``` # after ## expected something like this ```dart void foo() async { (await { 'asdf':...
This is a feature request to support the ability to configure the formatting line length from within the target file. The use case here is that I have a project...
Given: ```dart main() { target ..first() // comment ..setter = value ..another(); } ``` The new formatter outputs: ```dart main() { target ..first() // comment ..setter = value ..another(); }...
This meta issue tracks work remaining to be done to ship the new "tall style" proposal (#1253). ### Implement tall style: - [x] **Implement all language syntax using the new...
Since no formatter is perfect (e.g., some const/final nested collection constructs try to represent actual readable structure meaning in the code via their indentation that the formatter cannot be expected...
In VS Code/LSP I'd like to add support for re-wrapping comments (eg. you insert/delete words in a comment that mean they're no longer wrapped nicely at 80 characters, and fixing...
One of the best parts of Dart is the tooling, and the lack of comment and string wrapping (especially while those rules are enforced by presubmits) is a pretty major...
Similar formatting issue as https://github.com/dart-lang/dart_style/issues/548. With a constructor redirect, nice! ```dart const factory PublicType.constructor( String a, Type b, ) = PublicTypeImpl._; ``` With `=>`, sadface ```dart factory PublicType.constructor( String a,...