RatingStars class
评级星星
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- RatingStars
- Available extensions
Constructors
- RatingStars({Key? key, required RatingStarsBuilder builder, int starCount = 5, RatingStarsChanged? onChanged, Size starSize = const Size(20, 20), double starSpacing = 4, double value = 0.0, double step = 0.5, bool rounded = false, double minStars = 0, bool enable = true, bool followChanged = false})
-
const
Properties
- builder → RatingStarsBuilder
-
final
- enable → bool
-
是否开始滑动修改
final
- followChanged → bool
-
是否需要实时回调, 若开启, 拖动时会回调多次, 否则仅在用户操作结束后回调.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- minStars → double
-
最低分
final
- onChanged → RatingStarsChanged?
-
数值发生变化的回调.
final
- rounded → bool
-
四舍五入
默认false: 举例: step=1, 实际选择2.4则结果为: 3. step=0.5, 实际选择2.2则结果为2.5.("进一法")
为true时: 举例: step=1, 实际选择2.4则结果为: 2. step=0.5, 实际选择2.2则结果为2.0.("四舍五入-取最近值")
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- starCount → int
-
final
- starSize → Size
-
star size
final
- starSpacing → double
-
spacing 间距.
final
- step → double
-
分阶, 范围0.01-1.0, 0.01表示任意星, 1.0表示整星星, 0.5表示半星, 范围内自定义.
final
- value → double
-
初始数量(支持小数).
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< RatingStars> -
Creates the mutable state for this widget at a given location in the tree.
override
-
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}) → 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