ShikiDualTheme class

A pair of themes that resolve switches between based on brightness, letting a highlighter track light/dark mode without being rebuilt.

Inheritance

Constructors

ShikiDualTheme({required ShikiTheme light, required ShikiTheme dark})
Creates a dual theme from its light and dark variants.
const

Properties

dark ShikiTheme
The theme used when resolve is called with isDark: true.
final
hashCode int
The hash code for this object.
no setterinherited
light ShikiTheme
The theme used when resolve is called with isDark: false.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
themes List<ShikiTheme>
Every concrete ShikiTheme this references, for eager loading (see ShikiHighlighter.preload): a single theme yields itself; a ShikiDualTheme yields both its light and dark themes.
no setteroverride

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resolve({required bool isDark}) ShikiTheme
Returns the concrete ShikiTheme to use, choosing ShikiDualTheme.dark or ShikiDualTheme.light when isDark applies; a plain ShikiTheme ignores isDark and always returns itself.
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited