SupabaseGenConfig constructor

const SupabaseGenConfig({
  1. required String host,
  2. required int port,
  3. required String database,
  4. required String username,
  5. required String password,
  6. required bool ssl,
  7. required String outputDirectory,
  8. List<String> excludeTables = const ['migrations', 'schema_migrations'],
  9. List<String> includeTables = const [],
  10. List<String> excludeReferences = const [],
  11. bool generateForAllTables = true,
  12. bool generateModels = true,
  13. String modelsFileName = 'models.dart',
  14. String? modelPrefix = '',
  15. String? modelSuffix = 'Model',
  16. bool useNullSafety = true,
  17. String? repositorySuffix = 'Repository',
  18. String databaseName = 'app_db.sqlite',
  19. bool generateSupabaseSelectBuilders = false,
  20. String supabaseSelectBuildersFilePath = 'lib/database/supabase_select_builders.g.dart',
  21. String generatedSupabaseSchemaDartFilePath = 'lib/database/supabase_schema.dart',
  22. bool generateSqliteMigrations = false,
  23. String sqliteMigrationsSubDir = 'assets/sqlite_migrations',
  24. String schemaRegistryFilePath = 'lib/database/schema_registry.dart',
  25. String databaseImportPath = '../database/my_database.dart',
  26. List<String> sanitizationEndings = const ['_id', '_fk'],
  27. bool generateClientManagers = false,
  28. bool useRiverpod = true,
  29. String providersSubDir = 'providers',
  30. bool generateProviders = true,
  31. bool generateAuthentication = true,
  32. String authProfileTableName = 'profiles',
  33. bool generateBackgroundServices = true,
})

Implementation

const SupabaseGenConfig({
  // Database, General...
  required this.host,
  required this.port,
  required this.database,
  required this.username,
  required this.password,
  required this.ssl,
  required this.outputDirectory,
  this.excludeTables = const ['migrations', 'schema_migrations'],
  this.includeTables = const [],
  this.excludeReferences = const [],
  this.generateForAllTables = true,

  // Models, Repositories...
  this.generateModels = true,
  this.modelsFileName = 'models.dart',
  this.modelPrefix = '',
  this.modelSuffix = 'Model',
  this.useNullSafety = true,
  this.repositorySuffix = 'Repository',

  // Database Settings
  this.databaseName = 'app_db.sqlite',
  this.generateSupabaseSelectBuilders = false,
  this.supabaseSelectBuildersFilePath =
      'lib/database/supabase_select_builders.g.dart',
  this.generatedSupabaseSchemaDartFilePath =
      'lib/database/supabase_schema.dart',

  // SQLite Migration Settings
  this.generateSqliteMigrations = false,
  this.sqliteMigrationsSubDir = 'assets/sqlite_migrations',

  this.schemaRegistryFilePath = 'lib/database/schema_registry.dart',
  this.databaseImportPath = '../database/my_database.dart',

  this.sanitizationEndings = const ['_id', '_fk'],

  // --- ClientManager Settings ---
  this.generateClientManagers = false,
  this.useRiverpod = true,

  // --- Provider Settings ---
  this.providersSubDir = 'providers', // <<< NEW FIELD DEFAULT
  this.generateProviders = true,

  // --- Authentication Settings ---
  this.generateAuthentication = true, // Default to false
  this.authProfileTableName = 'profiles', // Default table name
  // --- Background Services Settings ---
  this.generateBackgroundServices = true, // Default to true
});