The single source of truth for all component theme configurations.
BaseTheme.build accepts a ColorScheme and produces a fully-configured
ThemeData with M3 enabled. Every component theme references scheme
instead of hardcoded colors.
Brand-specific packages call this with their own ColorScheme and
optionally apply .copyWith(...) for component-level overrides:
class BrandATheme {
static ThemeData dark() => BaseTheme.build(BrandAColorSchemes.dark);
}
// With brand-specific component override
class BrandBTheme {
static ThemeData dark() =>
BaseTheme.build(BrandBColorSchemes.dark).copyWith(
elevatedButtonTheme: ...,
);
}
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 Methods
-
build(
ColorScheme scheme, {String? fontFamily}) → ThemeData