MiuixRangeSliderPreference class

带范围滑块的偏好设置行。对应 Kotlin RangeSliderPreference

MiuixRangeSlider 放置在 MiuixBasicComponent 的底部区域(bottomAction 之下)。 末尾区域可显示 valueTextendActions;当 onClick 非空时追加右箭头图标。

Inheritance

Constructors

MiuixRangeSliderPreference({Key? key, required double startValue, required double endValue, required ValueChanged<(double, double)> onValueChange, String? title, MiuixBasicComponentColors? titleColor, String? summary, MiuixBasicComponentColors? summaryColor, Widget? startAction, String? valueText, List<Widget>? endActions, Widget? bottomAction, VoidCallback? onClick, bool holdDownState = false, bool enabled = true, double min = 0.0, double max = 1.0, int steps = 0, VoidCallback? onValueChangeFinished, double sliderHeight = MiuixSliderDefaults.minHeight, MiuixSliderColors? sliderColors, MiuixSliderHapticEffect hapticEffect = MiuixSliderDefaults.defaultHapticEffect, bool showKeyPoints = false, List<double>? keyPoints, double magnetThreshold = 0.02, EdgeInsetsGeometry insideMargin = MiuixBasicComponentDefaults.insideMargin})
const

Properties

bottomAction Widget?
底部滑块上方的额外内容(可选)。
final
enabled bool
是否启用。
final
endActions List<Widget>?
末尾区域额外内容(可选)。
final
endValue double
结束值;会被夹到 min..max
final
hapticEffect MiuixSliderHapticEffect
触感反馈类型。
final
hashCode int
The hash code for this object.
no setterinherited
holdDownState bool
是否处于按压态。
final
insideMargin EdgeInsetsGeometry
内边距。
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
keyPoints List<double>?
自定义关键点。
final
magnetThreshold double
磁吸阈值。
final
max double
滑块最大值。
final
min double
滑块最小值。
final
onClick VoidCallback?
点击回调;非空时末尾追加右箭头图标,整行可点击。
final
onValueChange ValueChanged<(double, double)>
值变更回调,参数为 (newStart, newEnd)
final
onValueChangeFinished VoidCallback?
值变更结束回调。
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
showKeyPoints bool
是否显示关键点。
final
sliderColors MiuixSliderColors?
滑块颜色。
final
sliderHeight double
滑块高度。
final
startAction Widget?
起始侧内容(可选)。
final
startValue double
起始值;会被夹到 min..max
final
steps int
离散步进数。
final
summary String?
行摘要(可选)。
final
summaryColor MiuixBasicComponentColors?
摘要颜色。
final
title String?
行标题(可选)。
final
titleColor MiuixBasicComponentColors?
标题颜色。
final
valueText String?
末尾区域显示的当前值文本(可选)。
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