UiBrand class
Runtime brand configuration consumed by UiThemeData.fromBrand.
Carries the brand-specific surface knobs that a host app wires at
bootstrap — colours, wordmarks, endpoints, display name. Pure tokens
(spacing, radius, typography, motion) stay under UiThemeTokens and
are not part of this contract.
The goal of the type is to be a single bootstrap seam: leaf widgets should never branch on brand id. When a runtime value needs to diverge per brand, plumb it through UiBrand instead.
- Annotations
Constructors
Properties
- accent → Color?
-
Optional accent used for focus rings / selection highlights when
the brand wants a non-neutral cursor tint.
final
- apiBaseUrl → Uri?
-
API base URL metadata — not consumed by Open UI Kit itself, but useful
to colocate with the brand config so one bootstrap produces both
theme + network bindings.
final
- danger → Color?
-
Optional override for destructive (
UiIntent.destructive) colour.final - darkLogo → Widget?
-
Dark-theme variant of logo. When omitted, logo is reused.
final
- displayName → String
-
Human-readable brand label used in UI copy + app bar titles.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- id → String
-
Short machine identifier (e.g.
"acme"). Used for analytics + switch statements at the bootstrap layer only.final - logo → Widget?
-
Optional logo — typical use is a
SvgPicture/Imageresolved at app bootstrap. Open UI Kit treats the widget as opaque.final -
metadata
→ Map<
String, Object?> -
Escape hatch for free-form brand settings (feature flags, remote
config seeds, etc.). Keyed data — avoid embedding widgets here.
final
- onPrimary → Color
-
final
- onSecondary → Color?
-
final
- primary → Color
-
Required foreground/background pair used for
UiIntent.primary.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- secondary → Color?
-
Optional secondary pair. Falls back to the neutral secondary
token when omitted.
final
Methods
-
colorTokens(
Brightness brightness) → UiColorTokens -
Build a colour-token snapshot for
brightnessusing this brand's values layered on top of the neutral Open UI Kit defaults. Pure: call it every build cycle without cost. -
copyWith(
{String? id, String? displayName, Color? primary, Color? onPrimary, Color? secondary, Color? onSecondary, Color? accent, Color? danger, Widget? logo, Widget? darkLogo, Uri? apiBaseUrl, Map< String, Object?> ? metadata}) → UiBrand -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
resolveLogo(
Brightness brightness) → Widget? - Logo resolved for the current brightness; falls back gracefully when only the light asset is supplied.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override