code_builder icon indicating copy to clipboard operation
code_builder copied to clipboard

A fluent API for generating valid Dart source code

Results 38 code_builder issues
Sort by recently updated
recently updated
newest added

As far as I'm aware, there's no way to generate trailing commas at the end of constructor/function invocations/declarations. It looks like the emitter is hard-coded to leave them out. It'd...

Adds support for the enhanced enums language feature by extending the properties of the current `Enum` class

I am encountering code in mockito, generating code which includes a class which implements a method called `List`. I think this is a method defined in proto-generated services. In any...

type-enhancement

Corrections of misspelled words.

Corrections of misspelled words.

See https://github.com/dart-lang/code_builder/pull/353 Currently `Method` uses a `Parameter` class, and it separates parameters into few Lists. The `Parameter` class indicates if it is named, so `optionalParameters` must have either all named,...

I'm trying to use these two apis to build a map statement code with some key-value literals and other map references, but have no idea how to use them with...

feedback: question

Whenever I try to use `literalList()` and pass non-literal expressions, I get the error: `Not a supported literal type` According to #225 this should be supported, though.

If I use `literalNum(10.0)`, the result will be `10`. But I need to make sure the result is a double, i.e. has at least one decimal digit. Is there any...

good first issue
type-enhancement