Skip to content

Allow required named parameters #4188

@DartBot

Description

@DartBot

This issue was originally filed by [email protected]


I really like the named parameters feature in dart, but was disappointed that it can only be used if the parameter is optional. Is there any reason why it is not allowed in general?

It is really usefull to write

  flipFlags(on: true, up: false, hidden: true);,

even if the parameters were not optional. I some cases, i dont want to use optional parameters but still like to call a function with named parameters.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-languageDart language related items (some items might be better tracked at github.com/dart-lang/language).closed-not-plannedClosed as we don't intend to take action on the reported issuetype-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