SupabaseGenConfig constructor
const
SupabaseGenConfig({
- required String host,
- required int port,
- required String database,
- required String username,
- required String password,
- required bool ssl,
- required String outputDirectory,
- List<
String> excludeTables = const ['migrations', 'schema_migrations'], - List<
String> includeTables = const [], - List<
String> excludeReferences = const [], - bool generateForAllTables = true,
- bool generateModels = true,
- String modelsFileName = 'models.dart',
- String? modelPrefix = '',
- String? modelSuffix = 'Model',
- bool useNullSafety = true,
- String? repositorySuffix = 'Repository',
- String databaseName = 'app_db.sqlite',
- bool generateSupabaseSelectBuilders = false,
- String supabaseSelectBuildersFilePath = 'lib/database/supabase_select_builders.g.dart',
- String generatedSupabaseSchemaDartFilePath = 'lib/database/supabase_schema.dart',
- bool generateSqliteMigrations = false,
- String sqliteMigrationsSubDir = 'assets/sqlite_migrations',
- String schemaRegistryFilePath = 'lib/database/schema_registry.dart',
- String databaseImportPath = '../database/my_database.dart',
- List<
String> sanitizationEndings = const ['_id', '_fk'], - bool generateClientManagers = false,
- bool useRiverpod = true,
- String providersSubDir = 'providers',
- bool generateProviders = true,
- bool generateAuthentication = true,
- String authProfileTableName = 'profiles',
- 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
});