Registry estatico da marca atual do app.
Funciona de forma analoga ao AppEnvironment: deve ser inicializado
no main() antes de qualquer uso, e o cliente e selecionado em
tempo de compilacao via --dart-define=CLIENT=<slug>.
Resolve slug → tema, e so isso. Nome do app, site e assets sao outra pergunta sobre o mesmo app, respondida por outro registry — ver AppBrandConfig sobre por que os dois se separaram.
Para adicionar um novo cliente:
- Criar o arquivo em
brands/<cliente>_brand.dart - Registra-lo no mapa
_brandsabaixo - Buildar com
flutter run --dart-define=CLIENT=<slug>
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
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
Static Properties
-
availableBrands
→ List<
String> -
Lista de slugs de marcas disponiveis.
no setter
- current → AppBrandConfig
-
Marca atual. Usa fallback se init nao foi chamado.
no setter
- rawClientSlug → String?
-
Slug recebido via dart-define. Null se init nao foi chamado.
no setter
Static Methods
-
init(
) → void -
Inicializa a marca a partir do dart-define
CLIENT. -
setBrand(
AppBrandConfig brand) → void - Define a marca manualmente (util para testes).