SiteSettings class

Acesso (servidor) às configurações do site guardadas em site_settings (registro único, coluna data em JSON). As páginas públicas leem daqui o que o admin editou (ex.: textos da home). Ver settingsModel.

Constructors

SiteSettings(Map<String, Object?> values)
const

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
values Map<String, Object?>
Mapa chave→valor já decodificado do JSON.
final

Methods

get(String key, [String fallback = '']) String
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

Static Methods

ensure(DbExecutor db, Map<String, Object?> defaults, {String table = 'site_settings', Object id = 1}) Future<void>
Garante que o registro exista (semeia defaults na primeira vez).
load(DbExecutor db, {String table = 'site_settings', Object id = 1}) Future<SiteSettings>
Carrega o registro id; devolve configurações vazias se não existir.