-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When completing a named function argument, can we include the boilerplate for the function signature? #25267
Comments
Another example that I just ran into:
Actual: Hoped/expected: |
If we do this at all, we should provide both options for completion:
I hate having to select text that was added for me and remove / replace it when it's wrong, and I often want to pass in a tear-off in cases like these. If we do this then we ought to also allow completion (to something like Of course, if we complete named parameter values we also need to complete positional parameter values that way. |
After autocomplete to "onPressed:", if you type "(" perhaps it should autocomplete to the parameter list for the callback function? |
Lambda completion is implemented w/ e0c178b. |
This is awesome to see! Is there a reason why this functionality is limited to named arguments, and not positional arguments, though? I would love to see this for functions like |
@greglittlefield-wf: working on it, but I see it wasn't tracked. Added here: #40202. Thanks for the feedback! |
Awesome, I'm so excited!! 😃 Thanks for the update! |
I'm trying to setup a FlatButton. I know it takes something like
onPressed
. I writenew FlatButton()
and then code complete inside the parens. I scroll to findonPressed
(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:I had to go to the docs to find out what
onPressed
expected. I was hoping I could learn that through code completion.The text was updated successfully, but these errors were encountered: