Skip to content

Commit cd67b3b

Browse files
committed
change logic to accept null value
1 parent 4ed4607 commit cd67b3b

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

lib/services/connection/call_manager/base_call_manager.dart

+7-2
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,13 @@ abstract class BaseCallManager<T> {
108108
required bool isSubscription,
109109
bool acceptNullValue = false,
110110
}) {
111-
final Map<String, dynamic> result = request.toJson()
112-
..removeWhere((String key, dynamic value) => value == null);
111+
final Map<String, dynamic> result;
112+
if (acceptNullValue) {
113+
result = request.toJson();
114+
} else {
115+
result = request.toJson()
116+
..removeWhere((String key, dynamic value) => value == null);
117+
}
113118

114119
if (isSubscription) {
115120
result.putIfAbsent('subscribe', () => 1);

0 commit comments

Comments
 (0)