This repository was archived by the owner on Apr 8, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +14
-7
lines changed
Expand file tree Collapse file tree 4 files changed +14
-7
lines changed Original file line number Diff line number Diff line change 1+ ## 1.0.0-beta+2
2+
3+ - BREAKING CHANGE: ` MethodModifier.async ` , ` MethodModifier.asyncStar ` and
4+ ` MethodModifier.syncStar ` are now ` MethodModifier.asAsync ` ,
5+ ` MethodModifier.asAsyncStar ` and ` MethodModifier.asSyncStar `
6+
17## 1.0.0-beta+1
28
39- Add support for ` switch ` statements
Original file line number Diff line number Diff line change @@ -34,9 +34,10 @@ ConstructorBuilder constructorNamed(
3434
3535/// Various types of modifiers for methods.
3636class MethodModifier implements ValidMethodMember {
37- static const MethodModifier async = const MethodModifier ._('async' , false );
38- static const MethodModifier asyncStar = const MethodModifier ._('async' , true );
39- static const MethodModifier syncStar = const MethodModifier ._('sync' , true );
37+ static const MethodModifier asAsync = const MethodModifier ._('async' , false );
38+ static const MethodModifier asAsyncStar =
39+ const MethodModifier ._('async' , true );
40+ static const MethodModifier asSyncStar = const MethodModifier ._('sync' , true );
4041
4142 final String _keyword;
4243
Original file line number Diff line number Diff line change 11name : code_builder
2- version : 1.0.0-beta+1
2+ version : 1.0.0-beta+2
33description : A fluent API for generating Dart code
44author :
Dart Team <[email protected] > 55homepage : https://github.com/dart-lang/code_builder
Original file line number Diff line number Diff line change @@ -172,7 +172,7 @@ void main() {
172172
173173 test ('should emit an async method' , () {
174174 expect (
175- method ('fetch' , [MethodModifier .async ]),
175+ method ('fetch' , [MethodModifier .asAsync ]),
176176 equalsSource (r'''
177177 fetch() async {}
178178 ''' ),
@@ -181,7 +181,7 @@ void main() {
181181
182182 test ('should emit an async* method' , () {
183183 expect (
184- method ('fetch' , [MethodModifier .asyncStar ]),
184+ method ('fetch' , [MethodModifier .asAsyncStar ]),
185185 equalsSource (r'''
186186 fetch() async* {}
187187 ''' ),
@@ -190,7 +190,7 @@ void main() {
190190
191191 test ('should emit an sync* method' , () {
192192 expect (
193- method ('fetch' , [MethodModifier .syncStar ]),
193+ method ('fetch' , [MethodModifier .asSyncStar ]),
194194 equalsSource (r'''
195195 fetch() sync* {}
196196 ''' ),
You can’t perform that action at this time.
0 commit comments