toMap method

Map<String, Object?> toMap()

Convert OneQuery to Map so it can be sent in HTTP request.

Implementation

Map<String, Object?> toMap() {
  return <String, Object?>{
    if (customParams != null) ...customParams!,
    'fields': fields?.join(','),
    'deep': deep?.map((key, value) => MapEntry(key, value.toMap())),
  }..removeWhere(
      (key, value) => value == null,
    );
}