rrousselGit / functional_widget

A code generator to write widgets as function without loosing the benefits of classes.
597 stars 46 forks source link

Cannot use parameter with same name as widget function #69

Open triallax opened 4 years ago

triallax commented 4 years ago

Example:

@widget
Widget foo(String foo) => Text(foo);

functional_widget generates a widget class for this, but it doesn't compile because the field name in the generated class shadows the function.

I don't think it's possible to fix this issue, so perhaps the best path is to print an error in this case.