BatchResponse.fromJson constructor

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

Implementation

factory BatchResponse.fromJson(Map<String, dynamic> json) {
  return BatchResponse(
    consumedCapacityUnits: json['ConsumedCapacityUnits'] as double?,
    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(),
  );
}