Skip to content

No parameter hints when invoking a callable class #5153

@HosseinYousefi

Description

@HosseinYousefi

In this code:

class Foo {
  int call(int a, String b) {
    return a + b.length;
  }
}

void main() {
  final foo = Foo();
  foo.call( // Auto-complete and hints are helpful.
}

when I write foo.call I get helpful auto-complete and hints about the signature of the method as expected, however I could call the same method using ():

void main() {
  final foo = Foo();
  foo( // No hints :(
}
Screenshot 2024-06-25 at 12 18 46 Screenshot 2024-06-25 at 12 18 27
Dart Code extension: 3.90.0
Flutter extension: 3.90.0 (activated)

App: Visual Studio Code
App Host: desktop
Remote: ssh-remote
Host Kind: ssh-remote
Version: linux 1.90.2

Workspace type: Dart, Flutter (LSP)

Dart (3.4.3)
Flutter (3.22.2)

Metadata

Metadata

Assignees

No one assigned

    Labels

    in editorRelates to code editing or language featuresin lsp/analysis serverSomething to be fixed in the Dart analysis serveris bugrelies on sdk changesSomething that requires changes in the Dart/Flutter SDK to ship before it will become available

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions