-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
P3A lower priority bug or feature requestA lower priority bug or feature requestdevexp-quick-fixIssues with analysis server (quick) fixesIssues with analysis server (quick) fixeslegacy-area-analyzerUse area-devexp instead.Use area-devexp instead.type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)Incorrect behavior (everything from a crash to more subtle misbehavior)
Description
I'm using the "create constructor for final fields" fix all the times to let my IDE generate constructors, mostly for Flutter widget but also for "normal" data classes. Unfortunately, I have manually prefix nearly all this.foo
attributes with required
because they are not nullable. It should be possible to detect whether I did not opt out of NNBD and generate the current syntax. Right now, the fix generates invalid code that doesn't compile.
As an additional bonus, it would be nice if the constructor would be created at the top of the class and not below the fields because according to Futter's coding style, I have to move the constructor declaration up each and every time.
samuelchanx, ronba and srawlins
Metadata
Metadata
Assignees
Labels
P3A lower priority bug or feature requestA lower priority bug or feature requestdevexp-quick-fixIssues with analysis server (quick) fixesIssues with analysis server (quick) fixeslegacy-area-analyzerUse area-devexp instead.Use area-devexp instead.type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)Incorrect behavior (everything from a crash to more subtle misbehavior)