toJson method Null safety

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final json = _$PollOptionRetrievalParamsToJson(this);
  json.removeWhere((key, value) => value == null);
  return json;
}