workspaces property

  1. @override
List<WorkspaceDefinition> get workspaces
override

Full-screen tools that take the viewport: a sprite editor, a dialogue graph. Opened with EditorScope.openWorkspace.

Implementation

@override
List<WorkspaceDefinition> get workspaces => [
  WorkspaceDefinition(
    id: workspaceId,
    label: 'Material',
    icon: Icons.texture,
    fileExtensions: const ['material.json'],
    build: (context, workspace) => MaterialWorkspace(
      path: workspace.path!,
      root: _root,
      pictures: pictures,
      maps: maps,
      changes: _changes.stream,
      workspace: workspace,
    ),
  ),
  WorkspaceDefinition(
    id: workspace2DId,
    label: '2D material',
    icon: Icons.auto_awesome,
    fileExtensions: const ['material2d.json'],
    build: (context, workspace) => Material2DWorkspace(
      path: workspace.path!,
      root: _root,
      maps: maps,
      changes: _changes.stream,
      workspace: workspace,
    ),
  ),
];