LogThemeData class final
The styles one log level is drawn with: the colours of the message, the punctuation, the key and the value, the path, the time and the rest.
A LogMainTheme holds one of these per level, and theme[level] hands
out the LogTheme wrapping it. Build one with LogThemeData.new for full
control, or with LogThemeData.seed to derive a whole set of styles from
one accent colour.
The ready-made palette
133 presets are declared here: gray5 through gray20, and the cube from
rgb002 to rgb444. Each is a LogThemeData.seed around one colour of
ansi_escape_codes, with a brighter emphasis and a dimmer dim derived
from it — rgb444 emphasises with rgb555 and dims to rgb333.
That derivation is what decides which colours are here, and the edges of the set are deliberate rather than arbitrary: a colour gets a preset only if it can serve as a base, with room for an emphasis above it and a still-visible dim below.
- Channel level 5 never bases a preset — nothing is brighter to emphasise with. It appears as an emphasis instead.
- The eight darkest corners of the cube — every channel 0 or 1,
rgb000throughrgb111— never base a preset: their dim would be invisible. - The grey ramp is 0–23 upstream; presets stop at gray5 and gray20 for the same reason at either end.
Adding a preset is not a breaking change and removing one is, so the set only ever grows. Check the rule before adding: a preset whose dim cannot be seen is worse than no preset at all.
- Mixed-in types
Constructors
-
LogThemeData({required Style normal, required Style inverse, required Style bold, required Style emphasis, required Style dim, required Style punctuation, required Style numStyle, required Style levelNameStyle, required Style timeStyle, required Style pathStyle, required Map<
String, LogStyle> messageStyles, required Style controlCodesStyle, required Style quotesStyle, required Style colonStyle, required Style ellipsisStyle, required Style lineBreakStyle, required Style paddingStyle, required Style sectionStyle, required Style nameStyle, required Style keyStyle, required Style valueStyle, required Style unitsStyle, required List<LogDepthTheme> depthThemes, required Style stackTraceActiveStyle, required Style stackTraceInactiveStyle, Set<String> tags = const {}}) -
const
-
LogThemeData.inactiveSeed({required Style normal, Style? emphasis, Style? dim, Style? punctuation, Style? bold, Style? inverse, Style? numStyle, Style? levelNameStyle, Style? timeStyle, Style? pathStyle, Map<
String, LogStyle> ? messageStyles, Style? controlCodesStyle, Style? quotesStyle, Style? colonStyle, Style? ellipsisStyle, Style? lineBreakStyle, Style? paddingStyle, Style? sectionStyle, Style? nameStyle, Style? keyStyle, Style? valueStyle, Style? unitsStyle, List<LogDepthTheme> ? depthThemes, Style? stackTraceActiveStyle, Style? stackTraceInactiveStyle, Set<String> ? tags = const {}}) -
LogThemeData.seed({required Style normal, required Style emphasis, required Style dim, required Style punctuation, Style? bold, Style? inverse, Style? numStyle, Style? levelNameStyle, Style? timeStyle, Style? pathStyle, Map<
String, LogStyle> ? messageStyles, Style? controlCodesStyle, Style? quotesStyle, Style? colonStyle, Style? ellipsisStyle, Style? lineBreakStyle, Style? paddingStyle, Style? sectionStyle, Style? nameStyle, Style? keyStyle, Style? valueStyle, Style? unitsStyle, required List<LogDepthTheme> depthThemes, Style? stackTraceActiveStyle, Style? stackTraceInactiveStyle, Set<String> ? tags})
Properties
- bold → Style
-
final
- colonStyle → Style
-
final
- controlCodesStyle → Style
-
final
-
depthThemes
→ List<
LogDepthTheme> -
final
- dim → Style
-
final
- ellipsisStyle → Style
-
final
- emphasis → Style
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- inverse → Style
-
final
- keyStyle → Style
-
final
- levelNameStyle → Style
-
final
- lineBreakStyle → Style
-
final
-
messageStyles
→ Map<
String, LogStyle> -
final
- nameStyle → Style
-
final
- normal → Style
-
final
- numStyle → Style
-
final
- paddingStyle → Style
-
final
- pathStyle → Style
-
final
- punctuation → Style
-
final
- quotesStyle → Style
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sectionStyle → Style
-
final
- stackTraceActiveStyle → Style
-
final
- stackTraceInactiveStyle → Style
-
final
-
final
- timeStyle → Style
-
final
- unitsStyle → Style
-
final
- valueStyle → Style
-
final
Methods
-
collectLoggableData(
LoggableData data) → void -
The method has to fill
datawith a description of the class.override -
copyWith(
{Style? normal, Style? inverse, Style? bold, Style? emphasis, Style? dim, Style? numStyle, Style? levelNameStyle, Style? timeStyle, Style? pathStyle, Map< String, LogStyle> ? messageStyles, Style? controlCodesStyle, Style? punctuation, Style? quotesStyle, Style? colonStyle, Style? ellipsisStyle, Style? lineBreakStyle, Style? paddingStyle, Style? sectionStyle, Style? nameStyle, Style? keyStyle, Style? valueStyle, Style? unitsStyle, List<LogDepthTheme> ? depthThemes, Style? stackTraceActiveStyle, Style? stackTraceInactiveStyle, Set<String> ? tags}) → LogThemeData -
copyWithMainStyles(
{required Style normal, Style? inverse, required Style emphasis, Style? bold, required Style dim, List< LogDepthTheme> ? depthThemes}) → LogThemeData -
copyWithPunctuation(
Style punctuation, {bool setForControlCodes = true, bool setForQuotes = true, bool setForColon = true, bool setForEllipsis = true, bool setForLineBreak = true, bool setForPadding = true}) → LogThemeData -
logClassInfo(
) → LoggableData -
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A class that mixes in Loggable has thereby accepted that its
toStringIS log rendering: its properties are sanitized here just as in objectToString, so the object itself is offered to the rule in the root position too (see_rootToString).inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- gray10 → LogThemeData
-
final
- gray11 → LogThemeData
-
final
- gray12 → LogThemeData
-
final
- gray13 → LogThemeData
-
final
- gray14 → LogThemeData
-
final
- gray15 → LogThemeData
-
final
- gray16 → LogThemeData
-
final
- gray17 → LogThemeData
-
final
- gray18 → LogThemeData
-
final
- gray19 → LogThemeData
-
final
- gray20 → LogThemeData
-
final
- gray5 → LogThemeData
-
final
- gray6 → LogThemeData
-
final
- gray7 → LogThemeData
-
final
- gray8 → LogThemeData
-
final
- gray9 → LogThemeData
-
final
- rgb002 → LogThemeData
-
final
- rgb003 → LogThemeData
-
final
- rgb004 → LogThemeData
-
final
- rgb012 → LogThemeData
-
final
- rgb013 → LogThemeData
-
final
- rgb014 → LogThemeData
-
final
- rgb020 → LogThemeData
-
final
- rgb021 → LogThemeData
-
final
- rgb022 → LogThemeData
-
final
- rgb023 → LogThemeData
-
final
- rgb024 → LogThemeData
-
final
- rgb030 → LogThemeData
-
final
- rgb031 → LogThemeData
-
final
- rgb032 → LogThemeData
-
final
- rgb033 → LogThemeData
-
final
- rgb034 → LogThemeData
-
final
- rgb040 → LogThemeData
-
final
- rgb041 → LogThemeData
-
final
- rgb042 → LogThemeData
-
final
- rgb043 → LogThemeData
-
final
- rgb044 → LogThemeData
-
final
- rgb102 → LogThemeData
-
final
- rgb103 → LogThemeData
-
final
- rgb104 → LogThemeData
-
final
- rgb112 → LogThemeData
-
final
- rgb113 → LogThemeData
-
final
- rgb114 → LogThemeData
-
final
- rgb120 → LogThemeData
-
final
- rgb121 → LogThemeData
-
final
- rgb122 → LogThemeData
-
final
- rgb123 → LogThemeData
-
final
- rgb124 → LogThemeData
-
final
- rgb130 → LogThemeData
-
final
- rgb131 → LogThemeData
-
final
- rgb132 → LogThemeData
-
final
- rgb133 → LogThemeData
-
final
- rgb134 → LogThemeData
-
final
- rgb140 → LogThemeData
-
final
- rgb141 → LogThemeData
-
final
- rgb142 → LogThemeData
-
final
- rgb143 → LogThemeData
-
final
- rgb144 → LogThemeData
-
final
- rgb200 → LogThemeData
-
final
- rgb201 → LogThemeData
-
final
- rgb202 → LogThemeData
-
final
- rgb203 → LogThemeData
-
final
- rgb204 → LogThemeData
-
final
- rgb210 → LogThemeData
-
final
- rgb211 → LogThemeData
-
final
- rgb212 → LogThemeData
-
final
- rgb213 → LogThemeData
-
final
- rgb214 → LogThemeData
-
final
- rgb220 → LogThemeData
-
final
- rgb221 → LogThemeData
-
final
- rgb222 → LogThemeData
-
final
- rgb223 → LogThemeData
-
final
- rgb224 → LogThemeData
-
final
- rgb230 → LogThemeData
-
final
- rgb231 → LogThemeData
-
final
- rgb232 → LogThemeData
-
final
- rgb233 → LogThemeData
-
final
- rgb234 → LogThemeData
-
final
- rgb240 → LogThemeData
-
final
- rgb241 → LogThemeData
-
final
- rgb242 → LogThemeData
-
final
- rgb243 → LogThemeData
-
final
- rgb244 → LogThemeData
-
final
- rgb300 → LogThemeData
-
final
- rgb301 → LogThemeData
-
final
- rgb302 → LogThemeData
-
final
- rgb303 → LogThemeData
-
final
- rgb304 → LogThemeData
-
final
- rgb310 → LogThemeData
-
final
- rgb311 → LogThemeData
-
final
- rgb312 → LogThemeData
-
final
- rgb313 → LogThemeData
-
final
- rgb314 → LogThemeData
-
final
- rgb320 → LogThemeData
-
final
- rgb321 → LogThemeData
-
final
- rgb322 → LogThemeData
-
final
- rgb323 → LogThemeData
-
final
- rgb324 → LogThemeData
-
final
- rgb330 → LogThemeData
-
final
- rgb331 → LogThemeData
-
final
- rgb332 → LogThemeData
-
final
- rgb333 → LogThemeData
-
final
- rgb334 → LogThemeData
-
final
- rgb340 → LogThemeData
-
final
- rgb341 → LogThemeData
-
final
- rgb342 → LogThemeData
-
final
- rgb343 → LogThemeData
-
final
- rgb344 → LogThemeData
-
final
- rgb400 → LogThemeData
-
final
- rgb401 → LogThemeData
-
final
- rgb402 → LogThemeData
-
final
- rgb403 → LogThemeData
-
final
- rgb404 → LogThemeData
-
final
- rgb410 → LogThemeData
-
final
- rgb411 → LogThemeData
-
final
- rgb412 → LogThemeData
-
final
- rgb413 → LogThemeData
-
final
- rgb414 → LogThemeData
-
final
- rgb420 → LogThemeData
-
final
- rgb421 → LogThemeData
-
final
- rgb422 → LogThemeData
-
final
- rgb423 → LogThemeData
-
final
- rgb424 → LogThemeData
-
final
- rgb430 → LogThemeData
-
final
- rgb431 → LogThemeData
-
final
- rgb432 → LogThemeData
-
final
- rgb433 → LogThemeData
-
final
- rgb434 → LogThemeData
-
final
- rgb440 → LogThemeData
-
final
- rgb441 → LogThemeData
-
final
- rgb442 → LogThemeData
-
final
- rgb443 → LogThemeData
-
final
- rgb444 → LogThemeData
-
final
Constants
-
defaultInactiveMessageStyles
→ const Map<
String, LogStyle> -
defaultMessageStyles
→ const Map<
String, LogStyle> -
defaultMutedMessageStyles
→ const Map<
String, LogStyle> - defaultMutedPunctuation → const Style
-
defaultNoColorsMessageStyles
→ const Map<
String, LogStyle> - defaultPunctuation → const Style
- noColors → const LogThemeData