diff --git a/generator/lib/src/generator.dart b/generator/lib/src/generator.dart index ad3a92e85..e894a0791 100644 --- a/generator/lib/src/generator.dart +++ b/generator/lib/src/generator.dart @@ -674,7 +674,6 @@ class RetrofitGenerator extends GeneratorForAnnotation { blocks.add(refer("$_dataVar.addAll").call([ refer("${_bodyName.displayName} ?? {}") ]).statement); - blocks.add(Code("$_dataVar.removeWhere((k, v) => v == null);")); } else if (_typeChecker(File).isExactly(_bodyName.type.element)) { blocks.add(refer("Stream") .property("fromIterable") @@ -700,7 +699,6 @@ class RetrofitGenerator extends GeneratorForAnnotation { refer("${_bodyName.displayName}?.toJson() ?? {}") ]).statement); } - blocks.add(Code("$_dataVar.removeWhere((k, v) => v == null);")); } else { /// @Body annotations with no type are assinged as is blocks diff --git a/generator/pubspec.yaml b/generator/pubspec.yaml index 5071ab63b..4bf656b61 100644 --- a/generator/pubspec.yaml +++ b/generator/pubspec.yaml @@ -1,6 +1,6 @@ name: retrofit_generator description: retrofit generator is an dio client generator using source_gen and inspired by Chopper and Retrofit. -version: 1.3.7+4 +version: 1.3.7+5 homepage: https://mings.in/retrofit.dart/ repository: https://github.com/trevorwang/retrofit.dart/