ThemedAsset class
An asset with separate light and dark mode paths.
When called as a Component, renders both variants with CSS-based visibility switching (same pattern as ThemeToggle).
Constructors
- ThemedAsset({required String light, required String dark})
Properties
- dark → AssetVariant
-
The dark-mode variant.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- light → AssetVariant
-
The light-mode variant.
final
- path → String
-
The default asset path (light-mode path, or the single path).
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
call(
{String alt = '', String? classes}) → Component -
Returns a Component for this asset.
override
-
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