EditorState class

编辑器全局状态树

Inheritance
Mixed-in types

Constructors

EditorState({List<EditorElement>? initialElements})

Properties

canRedo bool
no setter
canUndo bool
no setter
currentManifestCategory String
no setterinherited
currentManifestDescription String
no setterinherited
currentManifestId String
no setterinherited
currentManifestName String
no setterinherited
document → KoiPrintDocument
no setter
elements List<EditorElement>
no setter
hashCode int
The hash code for this object.
no setterinherited
hasListeners bool
Whether any listeners are currently registered.
no setterinherited
isModeExplicitlySet bool
no setter
isPreviewMode bool
no setterinherited
isTicketMode bool
no setter
labelScale double
no setter
mockData Map<String, dynamic>
no setterinherited
paperWidthPx double
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
schema List<KoiTemplateField>
no setterinherited
schemaEntity String
Schema 所属实体名 (用于左面板 "单据模型: xxx" 显示)。
no setterinherited
selectedElement EditorElement?
no setter
selectedElementId String?
no setter

Methods

addListener(VoidCallback listener) → void
Register a closure to be called when the object changes.
inherited
addSchemaField(KoiTemplateField field) → void
inherited
dispose() → void
Discards any resources used by the object.
inherited
execute(EditorCommand command) → void
initManifestIdentity(String id, String name, String category, String description) → void
inherited
initSchemaAndMock(List<KoiTemplateField> newSchema, Map<String, dynamic> newMockData) → void
inherited
loadManifest(KoiTemplateManifest manifest, List<EditorElement> elements) → void
KoiTemplateManifest 加载完整模板 (元素 + Schema + 假数据 + 身份)。
loadTemplate(List<EditorElement> templateElements) → void
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Call all the registered listeners.
inherited
redo() → void
removeListener(VoidCallback listener) → void
Remove a previously registered closure from the list of closures that are notified when the object changes.
inherited
removeSchemaField(int index) → void
inherited
selectElement(String? id) → void
setExplicitLabelMode(bool isLabel) → void
togglePreviewMode() → void
inherited
toString() String
A string representation of this object.
inherited
undo() → void
updateElementNoHistory(String id, KoiPrintElement newElement) → void
updateElements(List<EditorElement> newElements) → void
updateManifestMetadata({String? id, String? name, String? category, String? description}) → void
inherited
updateMockData(Map<String, dynamic> data) → void
inherited
updatePaperWidthPx(double widthPx) → void
inherited
updateSchema(List<KoiTemplateField> schema) → void
inherited
updateSchemaField(int index, KoiTemplateField field) → void
inherited
zoomIn() → void
zoomOut() → void

Operators

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