Skip to content
All examples
Example · Live

Notes Workspace

A real notes app as three native windows — a List, an Editor and a live Inspector — talking over AppBus, with edits that persist across relaunch. Around 250 lines of Dart, zero Win32.

workspace · notes_workspace.dartlive

One app, three windows — the same note in sync across all of them. That's AppBus, not a screenshot trick.

Why this example matters

What it demonstrates.

Everything that makes Morphic different, in one app you can actually use.

Multi-window architecture
Three real OS windows — a List, an Editor and an Inspector — declared from one MorphicApp and orchestrated by the runtime.
AppBus synchronization
Windows never reach into each other. They broadcast on note.selected / notes.changed; each reloads on the topics it cares about.
Independent Flutter engines
Every surface is its own isolated Flutter engine in one process — separate UI, shared filesystem, zero Win32.
Persistence
A shared JSON file is the single source of truth. Edits autosave and survive a full relaunch.
Window lifecycle
The Editor closes its own window via MorphicSurface.close(); new notes spawn, delete and restore — real lifecycle, not tabs.
The three surfaces

Each window, on its own.

Independent engines, one shared store. Real captures from the running app.

list.dart
Notes List

The root workspace — selection, relative timestamps, inline rename and keyboard shortcuts.

editor.dart
Editor

Its own window. Autosaves as you type, with a live word count and Ctrl+S / Ctrl+W.

inspector.dart
Inspector

Live metadata for the selected note — words, characters, reading time and timestamps.

Architecture

One rule, three windows.

No window reaches into another. They persist to a shared store and broadcast over AppBus — every surface reloads on the events it cares about.

Notes List
note.selected
AppBus
notes.changed
EditorInspector

Pick a note in the List → it broadcasts note.selected and the Editor and Inspector open it. Type → the Editor saves and broadcasts notes.changed, and the Inspector's word count ticks live.

Run it yourself

Clone & run.

Windows desktop, with Visual Studio's “Desktop development with C++” workload. Three windows open and the most recent note is already loaded.

terminal
git clone https://github.com/zhadow-dev/morphiccd morphic/examples/notes_workspaceflutter create --platforms=windows .   # scaffold the windows/ runnerflutter pub getdart run morphic:init --apply           # host the Morphic runtimeflutter run -d windows

Read the source

Three files: main.dart declares the windows, surfaces.dart is the UI, and store.dart is persistence + AppBus.