Skip to content

Display super-parameters as <type> <identifier>, same as field formal parameters #2891

@srawlins

Description

@srawlins

I think the only work to do for #2878 is in how to display a constructor which uses super-parameters. Here is an example of a constructor using field formal parameters:

https://api.dart.dev/stable/2.15.1/dart-io/HttpException/HttpException.html

Even though the implementation is const HttpException(this.message, {this.uri});, dartdoc "desugars" the first parameter to String message, displaying the type, and linking the type.

I think super-parameters should be the same: super.foo should desugar to <type> foo, linking <type>. Default values should be handled as they are in other signatures.

I think it would be great to link the name of the parameter/field to the field, both for field formal parameters and super-parameters. This would be a separate enhancement though.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1A high priority bug; for example, a single project is unusable or has many test failurestype-enhancementA request for a change that isn't a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions