Skip to content
This repository has been archived by the owner on Nov 1, 2024. It is now read-only.

Releases: dart-archive/code_builder

package:code_builder v4.9.0

15 Dec 18:44
4d097c4
Compare
Choose a tag to compare
  • Add Library.generatedByComment to support emitting 'generated by' comments.
  • Support emitting an unnamed library with annotations.

package:code_builder v4.7.0

25 Sep 11:50
d839123
Compare
Choose a tag to compare
  • Add a newline after lambdas.

package:code_builder v4.6.0

30 Aug 00:12
5d5ff13
Compare
Choose a tag to compare
  • 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

01 Jun 04:02
b07f6b3
Compare
Choose a tag to compare
  • 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 and literalNullSafeSpread 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

30 Aug 21:51
abc987e
Compare
Choose a tag to compare
Prepare to release 3.1.3. (#229)

* Prepare to release 3.1.3.

* Remove old file.

v3.1.1

26 Jun 21:02
Compare
Choose a tag to compare
  • Expression.asA is now wrapped with parenthesis so that further calls may be
    made on it as an expression.

v3.1.0

01 Jun 19:02
Compare
Choose a tag to compare

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

10 Feb 18:58
36b5eb6
Compare
Choose a tag to compare
  • Fix a bug that caused all downstream users of code_builder to crash due to
    build_runner trying to import our private builder (in tool/). Sorry for
    the inconvenience.

v3.0.2

10 Feb 01:14
cd54ee5
Compare
Choose a tag to compare
  • Require source_gen: ^0.7.5.

v3.0.1

30 Jan 03:51
5127d17
Compare
Choose a tag to compare
  • Upgrade to built_value 5.1.0.
  • Export the literalNum function.
  • BUG FIX: literal supports a Map.