StormyThemeConfig class
Stormy Theme Config - 主题配置 用于配置 Stormy 主题,支持主题色和自定义主题变体
Constructors
- StormyThemeConfig({Color? primaryColor, StormyThemeVariantFactory? lightVariantFactory, StormyThemeVariantFactory? darkVariantFactory, ThemeMode themeMode = ThemeMode.system})
-
const
- StormyThemeConfig.custom({Color? primaryColor, required StormyThemeVariant lightBuilder(StormyLightThemeVariant base), required StormyThemeVariant darkBuilder(StormyDarkThemeVariant base), ThemeMode themeMode = ThemeMode.system})
-
创建自定义配置
lightBuilder浅色主题构建器,接收浅色基础配置darkBuilder深色主题构建器,接收深色基础配置factory - StormyThemeConfig.defaults()
-
创建默认配置
factory
Properties
- darkVariant → StormyThemeVariant
-
创建深色主题变体
如果配置了自定义工厂则使用它,否则返回默认变体
no setter
- darkVariantFactory → StormyThemeVariantFactoryOrNull
-
深色主题变体工厂
传入一个返回深色主题变体的工厂函数
支持完全自定义(覆盖所有颜色、字体、间距等)
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- lightVariant → StormyThemeVariant
-
创建浅色主题变体
如果配置了自定义工厂则使用它,否则返回默认变体
no setter
- lightVariantFactory → StormyThemeVariantFactoryOrNull
-
浅色主题变体工厂
传入一个返回浅色主题变体的工厂函数
支持完全自定义(覆盖所有颜色、字体、间距等)
final
- primaryColor → Color?
-
主题色
用于自定义主题时覆盖默认主题色
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- themeMode → ThemeMode
-
主题模式
默认使用系统主题
final
Methods
-
copyWith(
{Color? primaryColor, StormyThemeVariantFactory? lightVariantFactory, StormyThemeVariantFactory? darkVariantFactory, ThemeMode? themeMode}) → StormyThemeConfig - 复制并修改配置
-
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