Skip to content

Allow defining an EnumValue with named parameters #1129

Open
@SamJakob

Description

@SamJakob

It doesn't appear possible to do this with code_builder and the functionality within Flutter to do this is relatively new.
In terms of an example:

//...
return EnumValue((builder) {
  b.name = 'example';
  b.arguments.add(literal("Some argument"));

  b.arguments.add(literal("Some other argument"), name: "test");
  // or alternatively, b.namedArguments could be added to EnumValueBuilder.
});
//...

Where this might result in the following:

// ...

  example("Some argument", test: "Some other argument"),

// ...

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions