Flutter template · Pub workspace
Flutter Monorepo
-
One workspace
A Dart pub workspace: two apps and the packages they share, under one pubspec at the root.
pubspec.yaml · workspace -
The shared foundation
Four packages hold everything both apps need: common (the design system and shared widgets), core (config, layout, network, session, theme), utils and features.
packages/acme/ -
Two apps on top
app_one and app_two stand on the packages; each keeps its own routes, mock fixtures and dependency injection, its features and its tests.
apps/ -
One layout, five window sizes
From a phone to a desktop window: a capsule bar when compact, an 80 dp rail, a 256 dp sidebar, two panes, then a capped width.
app_breakpoints.dart -
On the desktop
The same apps as Windows and macOS windows, with the sidebar from 840 dp — these are the template’s own golden renders.
windows/ · macos/ -
Every platform
Each app has Android, iOS, Windows, macOS, Linux and web runners.
flutter run -d windows -
Tests in each app
159 test files in app_one and 91 in app_two — about 400 tests per app.
flutter test -
Kept in step with the starter
.brick-sync and .template-sync tie the workspace to the starter brick, and the Claude Code rules and skills know the architecture.
.brick-sync -
Two apps, one foundation
Everything above: shared once, used twice.
flutter pub get
Flutter Monorepo
Inside the repository
-
The workspace, from the outside
1,101 files: two apps in apps/, the shared packages in packages/acme, the docs, the tools and the rules for Claude Code.
pubspec.yaml · workspace -
packages/acme — what both apps share
common, core, utils and features: four packages any app in the workspace depends on.
packages/acme/ -
core — 60 files
Config, layout, network with its interceptors, session, theme and services — one copy for both apps.
packages/acme/core/ -
One layout, five window sizes
The adaptive layout both apps use, from a phone to a desktop window: breakpoints, typography and the layout scope.
app_breakpoints.dart -
ds — the shared design system
29 widgets, written once, used by both apps.
packages/acme/common/ -
utils — 32 files
Constants, extensions and helpers shared across the workspace.
packages/acme/utils/ -
apps/app_one — 407 files
Its own routes, mock fixtures and dependency injection, on the shared packages; Android, iOS, Windows, macOS, Linux and web runners.
apps/app_one/ -
Its features
root, auth, showcase_feed, onboarding and settings — each data → domain → presentation.
apps/app_one/lib/features/ -
159 test files
The first app’s tests: the shared UI, features, core, translations and tools.
flutter test -
apps/app_two — the second app
A second app on the same packages, 342 files, with its own tests and its own Mason setup.
apps/app_two/ -
All of it
1,101 files: two apps, one set of packages, one adaptive layout.
flutter pub get
Two Flutter apps on four shared packages with one adaptive layout for phones, tablets and Windows/macOS windows — capsule bar to rail to sidebar — and about 400 tests per app.
- My role
- Author
- Period
- 2026
- Company
- Personal template
- Runs on
- Android · iOS · Windows · macOS · Linux · Web
Read the whole case study · 1 min
Two Flutter apps on four shared packages with one adaptive layout for phones, tablets and Windows/macOS windows — capsule bar to rail to sidebar — and about 400 tests per app.