Skip to content

When completing a named function argument, can we include the boilerplate for the function signature? #25267

Closed
@sethladd

Description

@sethladd

I'm trying to setup a FlatButton. I know it takes something like onPressed. I write new FlatButton() and then code complete inside the parens. I scroll to find onPressed (yay!) and hit enter.

Expected: add onPressed: () { }

Actual: onPressed:

That is, please fill in the function signature (which, in this case, is VoidCallback) when completing a named parameter that is a function.

I tried to code complete after the : but all I found was:

screen shot 2015-12-15 at 2 05 56 pm

I had to go to the docs to find out what onPressed expected. I was hoping I could learn that through code completion.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2A bug or feature request we're likely to work oncustomer-flutterdevexp-completionIssues with the analysis server's code completion featurelegacy-area-analyzerUse area-devexp instead.type-bugIncorrect behavior (everything from a crash to more subtle misbehavior)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions