sdk icon indicating copy to clipboard operation
sdk copied to clipboard

[Request] Add quick fix for "expected to find )"

Open bernaferrari opened this issue 3 years ago • 1 comments

When coming from JavaScript/TypeScript, where prettier auto-adds () when formatting, I always fight with Dart analyzer because it complains about my code but it never provides a fix (clicking and calling analyzer is faster than putting two '()' in opposite sides). While this is a trivial case, I've gotten confused in the past with longer chains or with copy and pasting JS code into Dart.

image

Expected:

List<String> lists = [];
lists.map(d => d.); // before
lists.map((d) => d.); // after

For missing ; there is already a quick fix. Only missing () there isn't.

bernaferrari avatar Aug 16 '21 02:08 bernaferrari