ThemeConfig class

The theme config contains light and dark theme data

Mixed in types

Constructors

ThemeConfig({ThemeData? data, ThemeExtensionBuilder? extensionBuilder, String? description})
Create a theme config
ThemeConfig.fromColor(Color color, {ThemeExtensionBuilder? extensionBuilder, String? description})
Create a theme config from color
ThemeConfig.mode({ThemeData? light, ThemeData? dark, ThemeExtensionBuilder? extensionBuilder, String? description})
Create a theme config for each theme mode

Properties

darkData ThemeData
The dark theme data
final
data ThemeData
The main/light theme data
final
description String?
Short description which describes the theme
final
extensionBuilder ThemeExtensionBuilder?
Builder that returns iterable of ThemeExtension
final
hashCode int
The hash code for this object.
no setteroverride
lightData ThemeData
The light theme data
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

colorSchemeOf(BuildContext context) ColorScheme
Return ColorScheme based on the brightness from the given BuildContext
copyWith({ThemeData? data, ThemeData? light, ThemeData? dark, ThemeExtensionBuilder? extensionBuilder, String? description}) ThemeConfig
Creates a copy of this ThemeConfig but with the given fields replaced with the new values.
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
override
merge(ThemeConfig? other) ThemeConfig
Returns a new ThemeConfig that is a combination of this object and the given other style.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toColor(Color? color) ThemeConfig
Creates a copy of this ThemeConfig but with the new color scheme value.
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) String
A string representation of this object.
inherited
toStringShort() String
A brief description of this object, usually just the runtimeType and the hashCode.
inherited

Operators

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