kh_starter_app¶
The Decennium Sprint starter template — a small, runnable Flutter app
with khflutterlib already wired up: theme applied, a welcome splash,
and both of kh_ui's navigation shells (KhBottomNav and
KhNavDrawer) built and ready to compare live.
This app is not part of khflutterlib's own build — it's deliberately
left out of the repo's Melos/Pub workspace, and its pubspec.yaml pulls
kh_core/kh_theme/kh_ui/kh_screens/kh_utils in via the exact same git
dependency + tag your own app will use (see
docs/hackathon-quickstart.md).
Nothing about how it resolves dependencies is special-cased for living
inside this monorepo.
Using this as your own app¶
- Copy this folder (
templates/starter_app/) out to its own location, outside thekhflutterlibclone. - Rename it, and update
pubspec.yaml'sname:field to match (Dart package names: lowercase, underscores). - This folder ships with
android/,web/andwindows/runner folders, so it runs on those out of the box. For iOS, macOS or Linux, generate the missing runners once, from inside this folder: That adds the platform folders without touching the existingpubspec.yamlorlib/. Drop platforms you don't need from the--platformslist. flutter pub get, thenflutter run.- Walk the flow once: welcome screen → pick a nav style → home shell.
Pick whichever nav style fits your app, then delete the other
branch in
lib/home_shell.dart, deletelib/nav_style_choice_screen.dart, and pointlib/welcome_screen.dart'sonInitializationCompletestraight at your chosen home screen. - Replace
lib/welcome_screen.dart'slogowith your own team/app branding, and each screen's placeholder content inlib/home_shell.dartwith your actual screens.
What's in here¶
lib/main.dart—MaterialAppwired toKhTheme.light()/.dark().lib/welcome_screen.dart— aKhSplashScreen(fromkh_screens) showing the welcome branding; swap in real bootstrap work via itsinitializecallback if your app needs one (session restore, a feature-flag fetch, etc. — seeKhSplashScreen's own doc comment).lib/nav_style_choice_screen.dart— the bottom-nav-vs-drawer picker; delete once you've chosen. Also showskh_utils'sKhLoggerwith a one-line log on selection — a starting point forKhValidatorsandKhFormatterstoo (seedocs/hackathon-quickstart.md).lib/home_shell.dart— the actual home screen, built once and rendered inside whichever shell you picked; three placeholder destinations (Home/Explore/Profile) usingKhCardfor content, so you're replacing real widget usage rather than starting from a blankText('TODO').
Not included¶
Login, auth, networking, and state management aren't wired up here, and
khflutterlib doesn't ship packages for them yet, so use whatever you
like for those. kh_screens does have a
KhLoginForm if your sprint app needs a login screen — it's not part
of this starter's default flow, but it's a drop-in you can add.