ReferenceApps
todo-mobile
The Flutter mobile app, generated by pnpm nx g @gentlemans-stack/nx-plugin:mobile-app (Nx project todo-mobile).
Theme
Colors, radii, fonts and motion come from ui-libs/design-tokens/src/tokens.json. Edit it, then run
pnpm nx run design-tokens:generate; that rewrites lib/core/theme/app_tokens.g.dart and assets/fonts/ (never hand-edit them) and the web
tokens.css. pnpm nx run design-tokens:generate-check fails on drift. The app's Design tokens screen
(lib/features/design_tokens/) shows every token; the web twin is /design in apps/todo-ui.
Widgets read colors from Theme.of(context) or AppTokens, never from literals.
Structure
lib/main.dartcallsinitLogging()first, then installs the framework error handler.lib/core/logging/app_logger.dart:package:loggingsink and named loggers. UseappLog, or addLogger('app.<subsystem>'). Neverprint;debugPrintis used only inside the sink.lib/core/router/:app_routes.dartholds path constants andapp_router.dartthego_routerroute table.lib/features/<feature>/: screens. Add one with theadd-flutter-pageskill.lib/core/theme/: generated tokens plus the theme builders.
Commands
pnpm nx run todo-mobile:analyze # flutter analyze (must be clean)
pnpm nx run todo-mobile:test # flutter test
pnpm nx run todo-mobile:format # dart format lib test
pnpm nx run todo-mobile:run # flutter run on a connected device or simulator
pnpm nx run todo-mobile:build-apk # build the Android APK
pnpm nx run todo-mobile:build-ios # build the iOS app