JkRate class
星级评分(对齐 uView Rate):
count、value、activeColor / inactiveColor、gutter、size、minCount、
allowHalf、disabled、readonly、activeIcon / inactiveIcon、touchable(滑动改分)。
- Inheritance
Constructors
-
JkRate({Key? key, required double value, ValueChanged<
double> ? onChanged, int count = 5, int minCount = 1, bool allowHalf = false, bool disabled = false, bool readonly = false, double size = 22, double gutter = 4, Color activeColor = const Color(0xFFFA3534), Color inactiveColor = const Color(0xFFB2B2B2), IconData activeIcon = Icons.star_rounded, IconData inactiveIcon = Icons.star_border_rounded, IconData? halfIcon, bool touchable = true}) -
const
Properties
- activeColor → Color
-
final
- activeIcon → IconData
-
final
- allowHalf → bool
-
是否允许半星(对齐 uView
allowHalf)。final - count → int
-
星星总数(对齐 uView
count,默认 5)。final - disabled → bool
-
禁用:不可操作,多用于展示(对齐 uView
disabled)。final - gutter → double
-
final
- halfIcon → IconData?
-
预留扩展;当前半星仍以裁剪 activeIcon 实现。
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- inactiveColor → Color
-
final
- inactiveIcon → IconData
-
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- minCount → int
-
至少点亮的星数(对齐 uView
minCount,默认 1)。final -
onChanged
→ ValueChanged<
double> ? -
final
- readonly → bool
-
只读:不可操作,视觉不弱化(对齐 uView
readonly)。final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- size → double
-
final
- touchable → bool
-
final
- value → double
-
当前星数,可为
.5步进(当 allowHalf 为true)。final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< JkRate> -
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, 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