MiuixSystemTheme class
一个便捷的 Builder,根据 MediaData 平台亮度自动套用浅色/深色主题。
对应 Kotlin ThemeController(ColorSchemeMode.System) 的跟随系统行为。
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- MiuixSystemTheme
Constructors
- MiuixSystemTheme({Key? key, MiuixColors? light, MiuixColors? dark, MiuixTextStyles? textStyles, int? fontWeightAdjustment, int boldTextFontWeightAdjustment = 100, required Widget child})
-
const
Properties
- boldTextFontWeightAdjustment → int
-
自动模式下,系统「粗体文字」开启时施加的字重偏移量,默认 +100(一档)。
final
- child → Widget
-
final
- dark → MiuixColors?
-
自定义深色配色。默认 darkColorScheme。
final
- fontWeightAdjustment → int?
-
显式指定全局字重偏移量(权重数值,100 为一档)。为 null(默认)时自动跟随系统
MediaQuery.boldText:开启时加 boldTextFontWeightAdjustment,关闭时为 0。 见 MiuixThemeData.fontWeightAdjustment。final - hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- light → MiuixColors?
-
自定义浅色配色。默认 lightColorScheme。
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- textStyles → MiuixTextStyles?
-
自定义文本样式。
final
Methods
-
build(
BuildContext context) → Widget -
Describes the part of the user interface represented by this widget.
override
-
createElement(
) → StatelessElement -
Creates a StatelessElement to manage this widget's location in the tree.
inherited
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of DiagnosticsNode objects describing this node's
children.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
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
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A short, textual description of this widget.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited