Quickstart
Add Morphic to a Flutter desktop project, initialize the native runner, and run. Three commands and you have a multi-surface app.
flutter pub add morphicdart run morphic:initflutter run -d windowsThen wrap your app with the runtime. A single entrypoint spawns and orchestrates every sovereign surface:
import class="tok-str">'package:morphic/morphic.dart'; void main() { class=class="tok-str">"tok-cmt">// One entrypoint. The runtime spawns and class=class="tok-str">"tok-cmt">// orchestrates every sovereign surface. runMorphicApp(app: MyApp());}Concepts
Morphic introduces a small set of primitives that compose into a full runtime:
- Surface
- A real native window backed by its own Flutter engine.
- Kind
- The role of a surface — workspace, inspector, palette, overlay — which drives native shell behavior.
- Ownership
- Owner chains keep panels raising, minimizing and traveling with their host.
- Group / Dock
- Surfaces that converge form a group; rigid co-movement follows.
- Extraction
- A grouped surface can detach mid-interaction into its own session.
- Orchestration
- A deterministic semantic runtime governs z-order and activation.
SDK
The authoring surface is intentionally small. You declare what surfaces exist and what they render; the runtime handles the rest.
class=class="tok-str">"tok-cmt">// Declare a surface with a kind + content.runMorphicApp( app: MyApp(), surfaces: [ SurfaceSpec( kind: SurfaceKind.workspace, content: () => EditorScreen(), ), SurfaceSpec( kind: SurfaceKind.inspector, content: () => InspectorPanel(), ), ],);Surfaces communicate through a shared app bus, so panels stay in sync while remaining isolated, independently-rendered windows.
Integration
Morphic wraps your existing Flutter app — it doesn't replace it. Add the dependency, run the initializer, and adopt surfaces incrementally.
dependencies: morphic: ^0.2.0dart run morphic:init wires the native multi-surface runner into your windows/ directory. Your widget tree is untouched.
Runtime Modes
Real OS windows with native shell semantics — taskbar, Alt-Tab, owner chains, deterministic z-order. Available today.
GPU-composited surfaces on a shared plane with materials, blur and scene zoom. Available for experimentation.
Architecture
The runtime is layered as a series of clean, swappable boundaries — each stage transforms intent into pixels on screen:
The source of truth: what surfaces exist and how they relate.
Drag, dock, group and extract gestures resolved deterministically.
Smoothing and coherence between semantic truth and native windows.
Geometry and z-order projected onto real OS windows.
The platform shell — Win32 today, more to come.