Skip to Content
gentlemans-stack
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.dart calls initLogging() first, then installs the framework error handler.
  • lib/core/logging/app_logger.dart: package:logging sink and named loggers. Use appLog, or add Logger('app.<subsystem>'). Never print; debugPrint is used only inside the sink.
  • lib/core/router/: app_routes.dart holds path constants and app_router.dart the go_router route table.
  • lib/features/<feature>/: screens. Add one with the add-flutter-page skill.
  • 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

On this page