DashboardCardStyle class

Shared "card chrome" for the dashboard stat card kit — background, border, corner radius, padding, and text styles.

This governs the container around a gauge, not the gauge canvas itself (see GaugeStyle/GaugeTokens for that). The defaults match a dark "smart car dashboard" aesthetic: a near-black glass card with a faint white edge. Override any field to match your own brand, or build a light-theme variant with copyWith.

const lightCard = DashboardCardStyle(
  backgroundColor: Colors.white,
  borderColor: Color(0x14000000),
  labelStyle: TextStyle(color: Colors.black54, fontSize: 11),
  valueStyle: TextStyle(color: Colors.black87, fontSize: 30),
);

Constructors

DashboardCardStyle({Color backgroundColor = const Color(0xFF12151C), Color borderColor = const Color(0x14FFFFFF), double borderWidth = 1.0, double cornerRadius = 24.0, EdgeInsetsGeometry padding = const EdgeInsets.all(16), TextStyle labelStyle = const TextStyle(color: Color(0xFF8A8F98), fontSize: 11, fontWeight: FontWeight.w600, letterSpacing: 1.0), TextStyle valueStyle = const TextStyle(color: Colors.white, fontSize: 30, fontWeight: FontWeight.w700, height: 1.0), TextStyle unitStyle = const TextStyle(color: Color(0xFF8A8F98), fontSize: 12, fontWeight: FontWeight.w600), double glowOpacity = 0.35, Color trackColor = const Color(0x14FFFFFF)})
const

Properties

backgroundColor Color
Card fill colour.
final
borderColor Color
Card edge colour — a faint stroke that reads as "glass" on a dark background.
final
borderWidth double
Card edge stroke width.
final
cornerRadius double
Card corner radius.
final
glowOpacity double
Opacity of the accent-coloured glow cast behind a card when its showGlow is true. 0 disables the glow shadow.
final
hashCode int
The hash code for this object.
no setterinherited
labelStyle TextStyle
Text style for the small uppercase label in the card header.
final
padding EdgeInsetsGeometry
Inner padding between the card edge and its content.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
trackColor Color
Colour of the unfilled portion of a ring or bar gauge inside the card. The default (a faint white wash) reads as "empty track" on the dark backgroundColor default — override this alongside backgroundColor for a light theme, e.g. Color(0x14000000), or the track becomes invisible against a white card.
final
unitStyle TextStyle
Text style for the unit suffix beside the value numeral.
final
valueStyle TextStyle
Text style for the large primary value numeral.
final

Methods

copyWith({Color? backgroundColor, Color? borderColor, double? borderWidth, double? cornerRadius, EdgeInsetsGeometry? padding, TextStyle? labelStyle, TextStyle? valueStyle, TextStyle? unitStyle, double? glowOpacity, Color? trackColor}) DashboardCardStyle
Returns a copy with the given fields replaced.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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