flutter_sqlite_scaffold

Generated Flutter SQLite CRUD scaffold.

Run

Mobile & Desktop

flutter pub get
flutter run

Web

To run on Flutter Web, you must first setup the WebAssembly binaries:

flutter pub get
dart run sqflite_common_ffi_web:setup
flutter run -d chrome

Verify

flutter analyze
flutter test

Structure

  • lib/data/models: typed SQLite models.
  • lib/data/services: database, CRUD, auth, session, and email services.
  • lib/controller: state controllers.
  • lib/screens: mobile screens by module.
  • lib/routes: route names and GoRouter configuration.
  • test: generated model, CRUD service, and auth tests.

Auth projects include a forgot-password route. Depending on generator options, it either resets locally or sends a temporary password through the generated Gmail SMTP email service.

Email-enabled projects generate a blank local lib/config/email_config.dart. Fill EmailConfig.smtpUsername and EmailConfig.smtpAppPassword before using email features. The local email_config.dart file is ignored by git because it can contain secrets. lib/config/email_config.example.dart is only a safe template/reference file to commit.

Regenerate this project from schema.sql with the scaffold generator when the schema changes. The generated database uses a simple schema version and destructive rebuild on upgrade, so keep backups if local data must be preserved.