Skip to content

Commit 8bab841

Browse files
committed
fix formatting
1 parent 58a6031 commit 8bab841

File tree

1 file changed

+18
-13
lines changed

1 file changed

+18
-13
lines changed

json_serializable/lib/src/type_helpers/json_helper.dart

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,14 @@ class JsonHelper extends TypeHelper<TypeHelperContextWithConfig> {
5252

5353
toJsonArgs.addAll(
5454
_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+
),
6263
);
6364
}
6465

@@ -112,9 +113,15 @@ class JsonHelper extends TypeHelper<TypeHelperContextWithConfig> {
112113

113114
final args = [
114115
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+
),
118125
];
119126

120127
output = args.join(', ');
@@ -162,13 +169,11 @@ List<String> _helperParams(
162169
final body = execute(typeArg, _helperLambdaParam);
163170
if (helperArg.type.element.declaration.metadata
164171
.any((md) => md.element?.displayName == 'jsonKeyType')) {
165-
print('JsonKeyType');
166172
const keyHelper = MapKeyHelper();
167-
168173
final newBody = isSerializing
169174
? keyHelper.serialize(typeArg, '', context)
170175
: keyHelper.deserialize(typeArg, '', context, false);
171-
args.add('($_helperLambdaParam) => $newBody /* todo json key */');
176+
args.add('($_helperLambdaParam) => $newBody');
172177
} else {
173178
args.add('($_helperLambdaParam) => $body');
174179
}

0 commit comments

Comments
 (0)