This repository has been archived by the owner on Nov 1, 2024. It is now read-only.
Releases: dart-archive/code_builder
Releases · dart-archive/code_builder
package:code_builder v4.9.0
- Add
Library.generatedByComment
to support emitting 'generated by' comments. - Support emitting an unnamed library with annotations.
package:code_builder v4.7.0
- Add a newline after lambdas.
package:code_builder v4.6.0
- Add support for named arguments in
enum
classes - Add support for external keyword on fields.
- Add
Expression.parenthesized
to manually wrap an expression in parenthesis.
package:code_builder v4.5.0
- Require Dart 2.19
- Add support for emitting type parameters for typedefs.
- Add support for class modifiers.
- Add support for records (both types and record literals).
- Add
literalSpread
andliteralNullSafeSpread
to support adding spreads to
literalMap
.
void main() {
// Creates a map
// {
// ...one,
// 2: two,
// ...?three,
// }
final map = literalMap({
literalSpread(): refer('one'),
2: refer('two'),
literalNullSafeSpread(): refer('three'),
});
}
v3.1.3
Prepare to release 3.1.3. (#229) * Prepare to release 3.1.3. * Remove old file.
v3.1.1
v3.1.0
3.1.0
- Added
Expression.asA
for creating explicit casts:
void main() {
test('should emit an explicit cast', () {
expect(
refer('foo').asA(refer('String')),
equalsDart('foo as String'),
);
});
}
v3.0.3
- Fix a bug that caused all downstream users of
code_builder
to crash due to
build_runner
trying to import our private builder (intool/
). Sorry for
the inconvenience.
v3.0.2
- Require
source_gen: ^0.7.5
.
v3.0.1
- Upgrade to
built_value
5.1.0. - Export the
literalNum
function. - BUG FIX:
literal
supports aMap
.