1
1
[ ![ Pub package] ( https://img.shields.io/pub/v/code_builder.svg )] ( https://pub.dev/packages/code_builder )
2
- [ ![ Build status ] ( https://travis-ci.org /dart-lang/code_builder.svg )] ( https://travis-ci.org /dart-lang/code_builder )
2
+ [ ![ Build Status ] ( https://github.com /dart-lang/code_builder/workflows/Dart%20CI/badge .svg?branch=master )] ( https://github.com /dart-lang/code_builder/actions?query=workflow%3A%22Dart+CI%22+branch%3Amaster )
3
3
[ ![ Gitter chat] ( https://badges.gitter.im/dart-lang/build.svg )] ( https://gitter.im/dart-lang/build )
4
4
5
5
A fluent, builder-based library for generating valid Dart code.
@@ -29,15 +29,16 @@ void main() {
29
29
```
30
30
31
31
Outputs:
32
+
32
33
``` dart
33
34
class Animal extends Organism {
34
35
void eat() => print('Yum!');
35
36
}
36
37
```
37
38
38
- Have a complicated set of dependencies for your generated code?
39
- ` code_builder ` supports automatic scoping of your ASTs to automatically
40
- use prefixes to avoid symbol conflicts:
39
+ Have a complicated set of dependencies for your generated code? ` code_builder `
40
+ supports automatic scoping of your ASTs to automatically use prefixes to avoid
41
+ symbol conflicts:
41
42
42
43
``` dart
43
44
import 'package:code_builder/code_builder.dart';
@@ -60,6 +61,7 @@ void main() {
60
61
```
61
62
62
63
Outputs:
64
+
63
65
``` dart
64
66
import 'package:a/a.dart' as _i1;
65
67
import 'package:b/b.dart' as _i2;
@@ -70,8 +72,8 @@ _i2.Other doOther() {}
70
72
71
73
## Contributing
72
74
73
- * Read and help us document common patterns over [ at the wiki] [ wiki ] .
74
- * Is there a * bug * in the code? [ File an issue] [ issue ] .
75
+ - Read and help us document common patterns over [ at the wiki] [ wiki ] .
76
+ - Is there a _ bug _ in the code? [ File an issue] [ issue ] .
75
77
76
78
If a feature is missing (the Dart language is always evolving) or you'd like an
77
79
easier or better way to do something, consider [ opening a pull request] [ pull ] .
@@ -91,9 +93,9 @@ will be on a best-effort basis.
91
93
92
94
# ## Updating generated (`.g.dart`) files
93
95
94
- > ** NOTE** : There is currently a limitation in ` build_runner` that requires
95
- > a workaround for developing this package. We expect this to be unnecessary
96
- > in the future.
96
+ > ** NOTE** : There is currently a limitation in ` build_runner` that requires a
97
+ > workaround for developing this package. We expect this to be unnecessary in
98
+ > the future.
97
99
98
100
Use [` build_runner` ][build_runner]:
99
101
0 commit comments