WorkspaceDefinition class

A large tool a module adds — a sprite editor, a dialogue graph — opened over the editor while the scene stays loaded underneath. One is open at a time. While one is, the level's tools, keys and play controls stand down.

Constructors

WorkspaceDefinition({required String id, required String label, required IconData icon, required Widget build(BuildContext context, WorkspaceContext workspace), List<String> fileExtensions = const [], int order = 100, WorkspacePresentation presentation = WorkspacePresentation.dialog})
const

Properties

build → Widget Function(BuildContext context, WorkspaceContext workspace)
Builds the workspace's content, inside the frame the editor puts it in.
final
fileExtensions → List<String>
File endings this workspace opens, lower case, without the dot — png, animator.json. The longest match wins, so animator.json beats json.
final
hashCode → int
The hash code for this object.
no setterinherited
icon → IconData
An icon that stands for the workspace, for buttons and menus that open it.
final
id → String
Names the workspace, unique among workspaces: what EditorScope.openWorkspace takes.
final
label → String
The workspace's name, as the editor's messages give it: <file> is open in <label>.
final
order → int
Lower sorts first; of two workspaces that fit a file equally well, the first opens it.
final
presentation → WorkspacePresentation
How it sits in the editor when it opens. A WorkspacePresentation.dialog one can still be switched to fill the editor (WorkspaceContext.onToggleFullScreen).
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

matchOf(String path) → int
How well this workspace fits path: the length of the ending it matched, 0 for none.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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