@@ -66,9 +66,7 @@ bool _parseVariableIsConstant(Json fragmentsJson) {
66
66
}
67
67
68
68
bool _findKeywordInFragments (Json json, String keyword) {
69
- final keywordIsPresent =
70
- json.any ((frag) => matchFragment (frag, 'keyword' , keyword));
71
- return keywordIsPresent;
69
+ return json.any ((frag) => matchFragment (frag, 'keyword' , keyword));
72
70
}
73
71
74
72
typedef ParsedPropertyInfo = ({
@@ -81,7 +79,7 @@ typedef ParsedPropertyInfo = ({
81
79
});
82
80
83
81
ParsedPropertyInfo parsePropertyInfo (Json json) {
84
- final (getter, setter) = _parsePropertyGetandSet (json);
82
+ final (getter, setter) = _parsePropertyGetAndSet (json);
85
83
return (
86
84
constant: _parseVariableIsConstant (json),
87
85
async : _findKeywordInFragments (json, 'async' ),
@@ -92,7 +90,7 @@ ParsedPropertyInfo parsePropertyInfo(Json json) {
92
90
);
93
91
}
94
92
95
- (bool , bool ) _parsePropertyGetandSet (Json fragmentsJson, {String ? path}) {
93
+ (bool , bool ) _parsePropertyGetAndSet (Json fragmentsJson, {String ? path}) {
96
94
if (fragmentsJson.any ((frag) => matchFragment (frag, 'text' , ' { get }' ))) {
97
95
// has explicit getter and no explicit setter
98
96
return (true , false );
@@ -119,8 +117,8 @@ ParsedPropertyInfo parsePropertyInfo(Json json) {
119
117
'Properties can not have a setter without a getter' ,
120
118
);
121
119
} else {
122
- // has no explicit getter and no explicit setter
123
- return (false , false );
120
+ // has implicit getter and implicit setter
121
+ return (true , true );
124
122
}
125
123
}
126
124
}
0 commit comments