fromJsonRaw static method

QueryResult<Map<String, dynamic>> fromJsonRaw(
  1. Map<String, dynamic> json
)

Creates a raw document result

Implementation

static QueryResult<Map<String, dynamic>> fromJsonRaw(Map<String, dynamic> json) {
  final docs = json['documents'] ?? json['data'] ?? json['results'] ?? <dynamic>[];
  return QueryResult<Map<String, dynamic>>(
    data: (docs as List).cast<Map<String, dynamic>>(),
    total: json['total'] as int?,
    limit: json['limit'] as int?,
    skip: json['skip'] as int?,
    hasMore: json['hasMore'] as bool? ?? false,
  );
}