KeysAndAttributes.fromJson constructor

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

Implementation

factory KeysAndAttributes.fromJson(Map<String, dynamic> json) {
  return KeysAndAttributes(
    keys: (json['Keys'] as List)
        .whereNotNull()
        .map((e) => Key.fromJson(e as Map<String, dynamic>))
        .toList(),
    attributesToGet: (json['AttributesToGet'] as List?)
        ?.whereNotNull()
        .map((e) => e as String)
        .toList(),
    consistentRead: json['ConsistentRead'] as bool?,
  );
}