RatingIndicator class

A rating indicator uses a series of horizontally arranged graphical symbols to communicate a ranking level. The default symbol is a star.

A rating indicator doesn’t display partial symbols—its value is rounded in order to display complete symbols only. Within a rating indicator, symbols are always the same distance apart and don't expand or shrink to fit the control.

Inheritance

Constructors

RatingIndicator({Key? key, required double value, int amount = 5, IconData ratedIcon = CupertinoIcons.star_fill, IconData unratedIcon = CupertinoIcons.star, Color? iconColor, double iconSize = 16, ValueChanged<double>? onChanged, String? semanticLabel})
Creates a rating indicator.
const

Properties

amount int
The amount of stars in the indicator. Defaults to 5
final
hashCode int
The hash code for this object.
no setterinherited
iconColor Color?
The color of the icon. If null, MacosThemeData.primaryColor is used
final
iconSize double
The size of the icon. Defaults to 16px
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
onChanged ValueChanged<double>?
Called when the current value of the indicator changes.
final
ratedIcon IconData
The icon used when the star is rated. CupertinoIcons.star_fill is used by default. If you must replace the star with a custom symbol, ensure that its purpose is clear.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
semanticLabel String?
The semantic label used by screen readers.
final
unratedIcon IconData
The icon used when the star is unrated. CupertinoIcons.star is used by default. If you must replace the star with a custom symbol, ensure that its purpose is clear.
final
value double
The current value. It must be in range of 0 to amount
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.
override
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