NmEditionTheme class
The look of an edition: an NmPalette plus Anton's gradient, gradient2 and forecolor … forecolor5.
- Annotations
Constructors
-
NmEditionTheme({required NmPalette palette, LinearGradient? gradient, LinearGradient? gradient2, List<
Color?> forecolors = const []}) -
Creates an NmEditionTheme.
const
- NmEditionTheme.of(NmConfig config)
-
Reads
palette(an NmPalette id or name:blue,green,orange,pink),gradient,gradient2andforecolor*ofconfig. Withoutpalettethe accent comes fromgradient(last stop), else blue.factory
Properties
-
forecolors
→ List<
Color?> -
forecolor…forecolor5as set by the edition (null where missing).final - gradient → LinearGradient?
-
gradient(main background), null when the edition sets none.final - gradient2 → LinearGradient?
-
gradient2(windows, sheets), null when the edition sets none.final - hashCode → int
-
The hash code for this object.
no setterinherited
- palette → NmPalette
-
Accent palette of the edition.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
background(
[Brightness brightness = Brightness.light]) → LinearGradient - Main background gradient: gradient, else the palette's soft wash.
-
forecolor(
[int n = 1, Brightness brightness = Brightness.light]) → Color -
Fore color
n(1 =forecolor, 2 =forecolor2…): the edition's, else derived from palette (1 brand, 2 brand light, 3 brand text, 4–5 danger), so editions withoutforecolor*never crash. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
tokens(
Brightness brightness, [NmTheme base = const NmTheme()]) → NmTokens - Tokens of the edition.
-
toNmTheme(
[NmTheme base = const NmTheme()]) → NmTheme -
The NmTheme of the edition (its palette; other axes from
base). -
toString(
) → String -
A string representation of this object.
inherited
-
toThemeData(
Brightness brightness, [NmTheme base = const NmTheme()]) → ThemeData - Material theme with NmTokens attached.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited