Open vogella opened 4 years ago
@pq
I see this error relatively often in your Flutter development training sessions for new Flutter developers.
Interestingly, it looks like we are not suggesting function references in completions at all.
Notice that foo()
is an invocation and not the reference.
I suspect we really want either:
foo
and foo()
, with foo
ranked higher, orfoo
, with foo()
filtered out since it's return type (int
) is not compatible with the expected function/fyi @bwilkerson
... it looks like we are not suggesting function references in completions at all.
I could believe that.
I'll offer another proposal, which is to propose both and then use type information for the ranking.
I'll offer another proposal, which is to propose both and then use type information for the ranking.
💯 this.
Code completion results in an error in the following case:
RaisedButton( onPressed: [CODE COMPLETION HERE] child: Text("Press me"), )
void doIt() {}
If I select doIt from the proposals I end up with:
RaisedButton( onPressed: doIt() child: Text("Press me"), ),
while it should be:
RaisedButton( onPressed: doIt child: Text("Press me"), ),