DbConfig class

Configuração de conexão ao banco — lida do ambiente (.env), só no servidor. Nunca embuta credenciais no código nem no cliente.

Constructors

DbConfig({required String host, required int port, required String database, required String user, required String password})
const
DbConfig.fromEnv([Map<String, String>? env])
Lê de variáveis de ambiente: DB_HOST, DB_PORT, DB_NAME, DB_USER, DB_PASSWORD.
factory

Properties

database String
final
hashCode int
The hash code for this object.
no setterinherited
host String
final
password String
final
port int
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
user String
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited