Skip to content

Change the formatting of parameters that are function types. #3671

Closed

Description

@kallentu

Related to this PR #3670
All function type parameters are currently in the format of <return-type> <name><type-parameters>()

For example, for source code of:

Object? extractIterableTypeArgument(
        Iterable iterable, Object? Function<T>() extract) =>
    internal.extractTypeArguments<Iterable>(iterable, extract);

Dartdoc renders it as:

extractIterableTypeArgument(Iterable iterable, Object? extract<T>()) → Object?

Object? extract<T>() instead of Object? Function<T>() extract

So perhaps change the format to one of the following

  • Always display the new format.
  • Always display what is in the source code; if they wrote the old school format, support that. There are plenty of cases in the Dart SDK at least that use the old school format, like Future.then.

Activity

  1. added
    P3A lower priority bug or feature request
    type-uxA user experience or user interface related issue
    type-enhancementA request for a change that isn't a bug
    and removed
    type-uxA user experience or user interface related issue
    on Feb 22, 2024
  2. added 2 commits that reference this issue on Oct 22, 2026
    17629ce
    3b2b1d4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3A lower priority bug or feature requesttype-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