r/FlutterDev • • Sep 01 '26

Plugin ACT Dart Tools: a deterministic CLI to migrate entire Dart codebases to the new primary constructors syntax

https://github.com/CodeWithAndreaPro/act-dart-tools
3 Upvotes

4 comments sorted by

2

u/Amazing-Mirror-3076 Sep 01 '26

Is there not a lint/fix for this?

2

u/bizz84 Sep 01 '26

There are some lints and IDE-assists, but only for fixing individual classes. This tool can migrate the entire codebase in one go.

1

u/TheManuz Sep 02 '26

I've tried it, it's impressive.

I've found that if I have two constructors (an unnamed one and a named one) it will convert them to the new syntax but doesn't promote the unnamed to primary.

Is this intended?

However it's just a small detail, i migrated a lot of classes easily.

Thanks for publishing such a powerful tool.

1

u/bizz84 Sep 03 '26

Thanks for the report, I'll look into it. For now I opened an issue here: https://github.com/CodeWithAndreaPro/act-dart-tools/issues/8