BankCreditScoreGauge class

Credit-score arc gauge with band segmentation, an animated needle sweep, a delta chip against the previous score, and a provider attribution line.

Score digits respect the ambient NumeralStyle. The sweep animation jumps straight to the final position under MediaQuery.disableAnimations.

BankCreditScoreGauge(
  score: 715,
  previousScore: 703,
  updatedAt: DateTime(2026, 5, 3),
  providerLabel: 'SIMAH',
)
Inheritance

Constructors

BankCreditScoreGauge({required int score, Key? key, int minScore = 300, int maxScore = 850, List<BankScoreBand>? bands, int? previousScore, DateTime? updatedAt, String? providerLabel, VoidCallback? onTap, double size = 180, String updatedPrefix = 'Updated', double? strokeWidth, Color? dotColor, TextStyle? scoreStyle, TextStyle? bandLabelStyle, TextStyle? deltaStyle, TextStyle? updatedStyle, Duration? animationDuration, Curve? animationCurve, String? semanticLabel})
const

Properties

animationCurve Curve?
Curve of the needle sweep. Defaults to Curves.easeOutCubic.
final
animationDuration Duration?
Duration of the needle sweep. Defaults to BankTokens.durationXSlow.
final
bandLabelStyle TextStyle?
Merged over the band label style (labelMedium in the band color).
final
bands List<BankScoreBand>?
Score bands rendered as arc segments. Defaults to a five-band poor → excellent scale across minScore..maxScore.
final
deltaStyle TextStyle?
Merged over the delta chip text style (labelSmall, gain or loss color).
final
dotColor Color?
Fill of the indicator dot. Defaults to the theme surface.
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
maxScore int
final
minScore int
final
onTap VoidCallback?
final
previousScore int?
Enables the delta chip and animates the sweep from this value.
final
providerLabel String?
Bureau attribution, e.g. 'TransUnion'.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
score int
final
scoreStyle TextStyle?
Merged over the score numeral style (numeralHero, onSurface).
final
semanticLabel String?
Overrides the whole computed semantics label.
final
size double
Diameter of the gauge.
final
strokeWidth double?
Stroke thickness of the arc segments. Defaults to 10.
final
updatedAt DateTime?
final
updatedPrefix String
final
updatedStyle TextStyle?
Merged over the updated/provider line style (bodySmall, variant color).
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<BankCreditScoreGauge>
Creates the mutable state for this widget at a given location in the tree.
override
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