Code Generation · Flutter
Flutter Code Generation
Prerequisites
- Flutter SDK 3.0 or higher
- Dart 3.0 or higher
Generated project structure
lib/ main.dart generated/ navigation/ router.g.dart (go_router setup, regenerated every run) presentation/ views/ auth/ (sign in, sign up, forgot/reset password) MODEL_NAME_list_view.dart MODEL_NAME_detail_view.dart MODEL_NAME_form_view.dart models/ (generated from your Underpeaks models) repositories/ (API calls to your Underpeaks public API) widgets/
Navigation
Routing is generated with go_router. Pages set to bottom-nav or drawer-nav in the console are wired into an AppShell (bottom nav) or DrawerShell (drawer) automatically. Everything else becomes a standalone route.
Running the generated app
flutter pub get
flutter run
The app connects to your Underpeaks instance automatically using the API URL embedded during generation.
Customising generated code
Files are tagged generated or customizable (see Code Generation). Navigation (router.g.dart) is always regenerated — don't hand-edit it. Auth screens and page views are customizable — edit them freely; the CLI detects your edits by checksum and won't overwrite them on the next run.
Regenerate with:
nxf generate flutter