DeskViewModel class

Constructors

DeskViewModel({required DataSource dataSource, required List<DocumentType<Serializable>> documentTypes})

Properties

archiveVersion → MutationSignal<DocumentVersion?, String>
latefinal
createDocument → MutationSignal<DeskDocument?, ({Map<String, dynamic> data, bool isDefault, bool publish, String? slug, String title})>
latefinal
currentDocumentId → Signal<String?>
final
currentDocumentType → Computed<DocumentType<Serializable>?>
Computed: resolves the slug to a DocumentType object.
latefinal
currentDocumentTypeSlug → Signal<String?>
final
currentVersionId → Signal<String?>
final
dataSource DataSource
final
deleteDocument → MutationSignal<({bool deleted, DeskDocument? newDefault}), String>
latefinal
deleteVersion → MutationSignal<bool, String>
latefinal
documentDataContainer → SignalContainer<dynamic, String, AwaitableFutureSignal<DocumentVersion?>>
latefinal
documentListVisible → Signal<bool>
final
documentsContainer → SignalContainer<dynamic, String, AwaitableFutureSignal<DocumentList>>
latefinal
documentTypes List<DocumentType<Serializable>>
The registered document types (injected from coordinator/app config).
final
hashCode int
The hash code for this object.
no setterinherited
hasUnpublishedChanges → Computed<bool>
True when the document has unsaved (unpublished) changes.
latefinal
publishCurrentDraft → MutationSignal<DocumentVersion, String>
Atomically publishes the document's current draft as a new version.
latefinal
restoreVersion → MutationSignal<DeskDocument, ({String documentId, String versionId})>
Restores a previous version's data into the current draft by fetching the reconstructed version state and pushing it through updateDocumentData. Does not auto-publish.
latefinal
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
selectedDocumentContainer → SignalContainer<dynamic, String, AwaitableFutureSignal<DeskDocument?>>
Fetches the full DeskDocument for the given ID.
latefinal
selectedDocumentId → Signal<String?>
final
selectedVersionId → Signal<String?>
final
setDefaultDocument → MutationSignal<DeskDocument?, String>
latefinal
sidebarCollapsed → Signal<bool>
final
versionsContainer → SignalContainer<dynamic, String, AwaitableFutureSignal<DocumentVersionList>>
latefinal

Methods

dispose() → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
refreshDocuments() → void
refreshSelectedData() → void
refreshVersions() → void
suggestSlug(String title) Future<String?>
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited