SolidThemeToggleConfig class
Configuration for theme toggle functionality in the Solid scaffold.
Constructors
- SolidThemeToggleConfig({bool enabled = true, IconData? lightModeIcon, IconData? darkModeIcon, IconData? systemModeIcon, VoidCallback? onToggleTheme, ThemeMode? currentThemeMode, bool showInAppBarActions = true, String? tooltip, String label = 'Toggle Theme', int priority = 1, bool showOnNarrowScreen = true, bool showOnVeryNarrowScreen = true})
-
const
Properties
- currentThemeMode → ThemeMode?
-
Current theme mode to determine which icon to show.
Only used for external state management. If null, internal state will be
used.
final
- darkModeIcon → IconData?
-
Custom icon for dark mode (defaults to moon icon).
final
- darkModeTooltip → String
-
Dark mode tooltip.
final
- enabled → bool
-
Whether the theme toggle is enabled.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- label → String
-
Label text for theme toggle in overflow menu.
final
- lightModeIcon → IconData?
-
Custom icon for light mode (defaults to sun icon).
final
- lightModeTooltip → String
-
Light mode tooltip.
final
- onToggleTheme → VoidCallback?
-
Callback when theme is toggled. Should handle the theme change logic.
If null, SolidScaffold will manage theme state internally.
final
- priority → int
-
Priority for ordering in overflow menu (higher numbers appear later).
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- showInAppBarActions → bool
-
Whether to show as icon button in AppBar actions or in overflow menu.
final
- showOnNarrowScreen → bool
-
Whether to show the theme toggle on narrow screens.
final
- showOnVeryNarrowScreen → bool
-
Whether to show the theme toggle on very narrow screens.
final
- systemModeIcon → IconData?
-
Custom icon for system mode (defaults to computer icon).
final
- systemModeTooltip → String
-
System mode tooltip.
final
- tooltip → String?
-
Tooltip text for the theme toggle button.
final
- usesInternalManagement → bool
-
Whether this config uses internal theme management.
no setter
Methods
-
getNextIcon(
ThemeMode themeMode, [SolidThemeModeConfig? modeConfig]) → IconData - Returns the appropriate icon for the next theme mode.
-
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