RatingSummary class
A rating summary widget.
Inspired by Google's "Audience rating summary".
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- RatingSummary
Constructors
- RatingSummary({Key? key, Color? backgroundColor, double borderRadius = 0, Color? color, num fiveStarCount = 0, Widget fiveStarLabel = const Text('5'), num fourStarCount = 0, Widget fourStarLabel = const Text('4'), num threeStarCount = 0, Widget threeStarLabel = const Text('3'), num twoStarCount = 0, Widget twoStarLabel = const Text('2'), num oneStarCount = 0, Widget oneStarLabel = const Text('1'), double height = 10, num? rating, double spacing = 4.0})
-
A rating summary widget.
const
Properties
- backgroundColor → Color?
-
The color used as a background for the indicators.
final
- borderRadius → double
-
The radii for each corner.
final
- color → Color?
-
The color of the indicators.
final
- fiveStarCount → num
-
The five star rating count.
final
- fiveStarLabel → Widget
-
The five star label.
final
- fourStarCount → num
-
The four star rating count.
final
- fourStarLabel → Widget
-
The four star label.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- height → double
-
The height of the indicators.
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- oneStarCount → num
-
The one star rating count.
final
- oneStarLabel → Widget
-
The one star label.
final
- rating → num?
-
The overall rating. Optional, if not given we
will calculate the overall rating for you.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- spacing → double
-
The spacing between the indicators.
final
- threeStarCount → num
-
The three star rating count.
final
- threeStarLabel → Widget
-
The three star label.
final
- twoStarCount → num
-
The two star rating count.
final
- twoStarLabel → Widget
-
The two star label.
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}) → 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