toJson method Null safety

Map<String, dynamic> toJson()

Implementation

core.Map<core.String, core.dynamic> toJson() => {
      if (resultPerPage != null) 'resultPerPage': resultPerPage!,
      if (startIndex != null) 'startIndex': startIndex!,
      if (totalResults != null) 'totalResults': totalResults!,
    };