File tree Expand file tree Collapse file tree 3 files changed +17
-22
lines changed Expand file tree Collapse file tree 3 files changed +17
-22
lines changed Original file line number Diff line number Diff line change 1+ ## 6.9.4
2+
3+ - Fix extra line being generated when targetting Dart 3.7 package.
4+
15## 6.9.3
26
37- Error out if the target package does not have a language version of ` 3.0 ` or
Original file line number Diff line number Diff line change @@ -317,27 +317,18 @@ _ConstructorData _writeConstructorInvocation(
317317 '$className '
318318 '${genericClassArguments (classElement , false )}'
319319 '$constructorExtra (' ,
320- );
321- if (constructorArguments.isNotEmpty) {
322- buffer
323- ..writeln ()
324- ..writeAll (constructorArguments.map ((paramElement) {
325- final content =
326- deserializeForField (paramElement.name, ctorParam: paramElement);
327- return ' $content ,\n ' ;
328- }));
329- }
330- if (namedConstructorArguments.isNotEmpty) {
331- buffer
332- ..writeln ()
333- ..writeAll (namedConstructorArguments.map ((paramElement) {
334- final value =
335- deserializeForField (paramElement.name, ctorParam: paramElement);
336- return ' ${paramElement .name }: $value ,\n ' ;
337- }));
338- }
339-
340- buffer.write (')' );
320+ )
321+ ..writeAll (constructorArguments.map ((paramElement) {
322+ final content =
323+ deserializeForField (paramElement.name, ctorParam: paramElement);
324+ return ' $content ,\n ' ;
325+ }))
326+ ..writeAll (namedConstructorArguments.map ((paramElement) {
327+ final value =
328+ deserializeForField (paramElement.name, ctorParam: paramElement);
329+ return ' ${paramElement .name }: $value ,\n ' ;
330+ }))
331+ ..write (')' );
341332
342333 usedCtorParamsAndFields.addAll (remainingFieldsForInvocationBody);
343334
Original file line number Diff line number Diff line change 11name : json_serializable
2- version : 6.9.3
2+ version : 6.9.4
33description : >-
44 Automatically generate code for converting to and from JSON by annotating
55 Dart classes.
You can’t perform that action at this time.
0 commit comments