FFStars class
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- FFStars
Constructors
- FFStars({required Widget normalStar, required Widget selectedStar, int starCount = 5, double defaultStars = 0.0, double step = 0.01, bool rounded = false, double starWidth = 30.0, double starHeight = 30.0, double starMargin = 10.0, double miniStars = 0.0, bool justShow = false, FFStarsChanged? starsChanged, bool followChange = false})
Properties
- defaultStars → double
-
默认需要显示的星星数量(支持小数).
final
- followChange → bool
-
是否需要实时回调, 若开启, 拖动时会回调多次, 否则仅在用户操作结束后回调.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- justShow → bool
-
仅做展示, 如果是true则用户不可修改星星内容.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- miniStars → double
-
最低分, 字面意思.
final
- normalStar → Widget
-
未选中(默认)的星星.
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
- selectedStar → Widget
-
选中(高亮)的星星.
final
- starCount → int
-
星星数量.
final
- starHeight → double
-
星星的高度.
final
- starMargin → double
-
两个星星中间的间距.
final
- starsChanged → FFStarsChanged?
-
数值发生变化的回调.
final
- starWidth → double
-
星星的宽度.
final
- step → double
-
分阶, 范围0.01-1.0, 0.01表示任意星, 1.0表示整星星, 0.5表示半星, 范围内自定义.
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → _FFStarsState -
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