create
suspend fun create(documentStore: DocumentStore, documentTypeRepository: DocumentTypeRepository?, documentOrderKey: String = "org.multipaz.DocumentModel.orderingKey", badgeFunction: suspend (document: Document) -> List<DocumentBadge> = { emptyList() }): DocumentModel
Creates a DocumentModel instance.
Parameters
documentStore
the DocumentStore which manages Document and Credential instances.
documentTypeRepository
a DocumentTypeRepository with information about document types or null.
documentOrderKey
the name of the key to use for storing the document order in the Tags object associated with documentStore.
badgeFunction
a function that takes a Document and returns a list of badges to show.