BankAssetPriceTicker class

Compact price + change-percentage row for a stock, ETF, or crypto asset.

Displays a BankEmblem logo circle (network image, symbol monogram otherwise), the asset symbol and name (unless compact is true), the current price, and a change chip.

The change chip is a BankTintChip — the same height, padding, radius, and ink as every other chip in the kit — tinted from the gain colour when AssetQuote.isPositive is true and the loss colour otherwise. Both are resolved for the surface brightness, so the pill does not stay light-mode red on a dark watchlist.

Tapping the row calls onTap when provided.

Inheritance

Constructors

BankAssetPriceTicker({required AssetQuote quote, Key? key, VoidCallback? onTap, bool compact = false, EdgeInsetsGeometry? padding, BorderRadius? radius, Widget? leading, TextStyle? titleStyle, TextStyle? subtitleStyle, TextStyle? amountStyle, Color? gainColor, Color? lossColor, String? semanticLabel})
const

Properties

amountStyle TextStyle?
Merged over the price style (numeralSmall, onSurface).
final
compact bool
When true, hides the asset name and shows only symbol + price + badge.
final
gainColor Color?
Overrides the positive tint used by both the price pulse and the change chip. Defaults to BankTokens.investmentGain, or BankTokens.investmentGainDark on a dark 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
leading Widget?
Replaces the logo/initials circle at the start of the row.
final
lossColor Color?
Overrides the negative tint used by both the price pulse and the change chip. Defaults to BankTokens.investmentLoss, or BankTokens.investmentLossDark on a dark surface.
final
onTap VoidCallback?
Called when the row is tapped. If null, no tap interaction is wired.
final
padding EdgeInsetsGeometry?
Overrides the row content padding. Defaults to space4 by space2.
final
quote AssetQuote
The quote data to display.
final
radius BorderRadius?
Overrides the tap ripple corner radius. Defaults to the theme cardRadius.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
semanticLabel String?
Overrides the computed row semantics label.
final
subtitleStyle TextStyle?
Merged over the asset name style (bodySmall, onSurfaceVariant).
final
titleStyle TextStyle?
Merged over the symbol style (labelLarge, onSurface).
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