JxStat class

A key figure with its label and an optional change, such as "Revenue: $48,200, +12% this month". A <dl>, so the label and the value are read together.

Constructors

JxStat({required String label, required String value, String? change, JxTrend trend = JxTrend.neutral, String? description, Map<JxTrend, String> trendLabels = const {JxTrend.up : 'Increase', JxTrend.down : 'Decrease'}, String? classes, Key? key})
const

Properties

change → String?
The change, already formatted, such as +12%.
final
classes → String?
final
description → String?
Muted text under the figure, such as "vs last month".
final
hashCode → int
The hash code for this object.
no setterinherited
key → Key?
Controls how one component replaces another component in the tree.
finalinherited
label → String
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
trend → JxTrend
Color and arrow of change. Green up and red down: invert them for figures where lower is better by passing the other trend.
final
trendLabels → Map<JxTrend, String>
Words read before change by screen readers, by trend.
final
value → String
The figure, already formatted.
final

Methods

build(BuildContext context) → Component
Describes the part of the user interface represented by this component.
createElement() → Element
Creates a StatelessElement to manage this component's location in the tree.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
shouldRebuild(covariant Component newComponent) → bool
Implement this method to determine whether a rebuild can be skipped.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited