QueryOutput.fromJson constructor

QueryOutput.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory QueryOutput.fromJson(Map<String, dynamic> json) {
  return QueryOutput(
    consumedCapacityUnits: json['ConsumedCapacityUnits'] as double?,
    count: json['Count'] as int?,
    items: (json['Items'] as List?)
        ?.whereNotNull()
        .map((e) => (e as Map<String, dynamic>).map((k, e) =>
            MapEntry(k, AttributeValue.fromJson(e as Map<String, dynamic>))))
        .toList(),
    lastEvaluatedKey: json['LastEvaluatedKey'] != null
        ? Key.fromJson(json['LastEvaluatedKey'] as Map<String, dynamic>)
        : null,
  );
}