AttachmentArchive.fromJson constructor

AttachmentArchive.fromJson(
  1. Map<String, Object?> json
)

Implementation

factory AttachmentArchive.fromJson(Map<String, Object?> json) {
  return AttachmentArchive(
    entries: (json[r'entries'] as List<Object?>?)
            ?.map((i) => AttachmentArchiveEntry.fromJson(
                i as Map<String, Object?>? ?? const {}))
            .toList() ??
        [],
    moreAvailable: json[r'moreAvailable'] as bool? ?? false,
    totalEntryCount: (json[r'totalEntryCount'] as num?)?.toInt(),
    totalNumberOfEntriesAvailable:
        (json[r'totalNumberOfEntriesAvailable'] as num?)?.toInt(),
  );
}