@@ -52,13 +52,14 @@ class JsonHelper extends TypeHelper<TypeHelperContextWithConfig> {
52
52
53
53
toJsonArgs.addAll (
54
54
_helperParams (
55
- context,
56
- context.serialize,
57
- _encodeHelper,
58
- interfaceType,
59
- toJson.parameters.where ((element) => element.isRequiredPositional),
60
- toJson,
61
- isSerializing: true ),
55
+ context,
56
+ context.serialize,
57
+ _encodeHelper,
58
+ interfaceType,
59
+ toJson.parameters.where ((element) => element.isRequiredPositional),
60
+ toJson,
61
+ isSerializing: true ,
62
+ ),
62
63
);
63
64
}
64
65
@@ -112,9 +113,15 @@ class JsonHelper extends TypeHelper<TypeHelperContextWithConfig> {
112
113
113
114
final args = [
114
115
output,
115
- ..._helperParams (context, context.deserialize, _decodeHelper,
116
- targetType, positionalParams.skip (1 ), fromJsonCtor,
117
- isSerializing: false ),
116
+ ..._helperParams (
117
+ context,
118
+ context.deserialize,
119
+ _decodeHelper,
120
+ targetType,
121
+ positionalParams.skip (1 ),
122
+ fromJsonCtor,
123
+ isSerializing: false ,
124
+ ),
118
125
];
119
126
120
127
output = args.join (', ' );
@@ -162,13 +169,11 @@ List<String> _helperParams(
162
169
final body = execute (typeArg, _helperLambdaParam);
163
170
if (helperArg.type.element.declaration.metadata
164
171
.any ((md) => md.element? .displayName == 'jsonKeyType' )) {
165
- print ('JsonKeyType' );
166
172
const keyHelper = MapKeyHelper ();
167
-
168
173
final newBody = isSerializing
169
174
? keyHelper.serialize (typeArg, '' , context)
170
175
: keyHelper.deserialize (typeArg, '' , context, false );
171
- args.add ('($_helperLambdaParam ) => $newBody /* todo json key */ ' );
176
+ args.add ('($_helperLambdaParam ) => $newBody ' );
172
177
} else {
173
178
args.add ('($_helperLambdaParam ) => $body ' );
174
179
}
0 commit comments