auth_form_gen
A local CLI package that generates Flutter authentication boilerplate.
The current template uses:
setStatefor screen-local state- SQLite for local demo storage
- A web-safe email service stub for registration and forgot-password flows
- No Riverpod
- No Firebase
Run
dart run auth_form_gen create
Preview without writing files:
dart run auth_form_gen create --dry-run
Generate into a custom auth root:
dart run auth_form_gen create --output lib
Generate with a specific template set:
dart run auth_form_gen create --template 1
Overwrite existing generated files:
dart run auth_form_gen create --force
Main App Setup
The generator writes a ready-to-run lib/main.dart with routes for login,
register, forgot password, and webview screens.
Generated files are placed under models/, screens/, services/, and
utils/.
App Dependencies
In the Flutter app that receives the generated files, add:
dependencies:
flutter:
sdk: flutter
sqflite: ^2.4.2
sqflite_common_ffi_web: ^1.1.2
web: ^1.1.1
webview_flutter: ^4.13.1
Then run:
flutter pub get