Collection.fromMap constructor

Collection.fromMap(
  1. Map<String, dynamic> map
)

Implementation

factory Collection.fromMap(Map<String, dynamic> map) {
  return Collection(
    $id: map['\$id'].toString(),
    $createdAt: map['\$createdAt'].toString(),
    $updatedAt: map['\$updatedAt'].toString(),
    $permissions: map['\$permissions'] ?? [],
    databaseId: map['databaseId'].toString(),
    name: map['name'].toString(),
    enabled: map['enabled'],
    documentSecurity: map['documentSecurity'],
    attributes: map['attributes'] ?? [],
    indexes: List<Index>.from(map['indexes'].map((p) => Index.fromMap(p))),
  );
}