Skip to content
This repository was archived by the owner on Apr 8, 2025. It is now read-only.

Commit a15df7b

Browse files
committed
rename MethodModifier constant names
1 parent 56a913a commit a15df7b

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## 1.0.0-beta+2
2+
3+
- BREAKING CHANGE: `MethodModifier.async`, `MethodModifier.asyncStar` and
4+
`MethodModifier.syncStar` are now `MethodModifier.$async`,
5+
`MethodModifier.$asyncStar` and `MethodModifier.$syncStar`
6+
17
## 1.0.0-beta+1
28

39
- Add support for `switch` statements

lib/src/builders/method.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ ConstructorBuilder constructorNamed(
3434

3535
/// Various types of modifiers for methods.
3636
class 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 $async = const MethodModifier._('async', false);
38+
static const MethodModifier $asyncStar = const MethodModifier._('async', true);
39+
static const MethodModifier $syncStar = const MethodModifier._('sync', true);
4040

4141
final String _keyword;
4242

test/builders/method_test.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff 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.$async]),
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.$asyncStar]),
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.$syncStar]),
194194
equalsSource(r'''
195195
fetch() sync* {}
196196
'''),

0 commit comments

Comments
 (0)