MetricsCard class
The marketing card: header (title + subtitle + "lower is better" badge),
a grid of metric tiles (rows, values from values by row key) and a
bottom legend. Rendered at a fixed landscape size by the render
harness (contract card), not laid out for arbitrary screens.
Deliberately no progress bar per tile: rows carry incommensurable units (ms, KB, elements), so a shared 0-100% fill would be meaningless — the value + unit is the data.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- MetricsCard
Constructors
-
MetricsCard({Key? key, required String title, required String subtitle, required List<
MetricsCardRow> rows, required Map<String, num> values, String? note, String? legend, String? lowerIsBetter = 'lower is better', MetricsCardStyle style = const MetricsCardStyle()}) -
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- legend → String?
-
Bottom bar text (legend).
final
- lowerIsBetter → String?
-
Header badge; null hides it (not every metric set is lower-is-better).
final
- note → String?
-
Extra tile text in the last right-column slot (methodology note).
final
-
rows
→ List<
MetricsCardRow> -
Metric tiles in display order (first column first).
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- style → MetricsCardStyle
-
final
- subtitle → String
-
final
- title → String
-
final
-
values
→ Map<
String, num> -
metric key -> recorded value.
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, 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