BankValueDiffList class

A card listing every field changed by an approval request.

Renders each BankValueDiffItem as a BankValueDiffRow, separated by 1 px dividers at 8% BankThemeData.onSurface opacity, inside a BankSummaryStack-consistent card: BankThemeData.surface background, BankThemeData.cardRadius corners, and a hairline BankThemeData.outline border. Renders nothing when items is empty.

BankValueDiffList(
  items: [
    BankValueDiffItem(
      label: 'Daily limit',
      oldMoney: Money.fromDouble(5000, 'USD'),
      newMoney: Money.fromDouble(25000, 'USD'),
      highlightIncrease: true,
    ),
    const BankValueDiffItem(
      label: 'Nickname',
      oldValue: 'Ops account',
      newValue: 'Operations: EMEA',
    ),
    const BankValueDiffItem(
      label: 'Second approver',
      newValue: 'Lina Haddad',
    ),
  ],
  title: 'Requested changes',
)
Inheritance

Constructors

BankValueDiffList({required List<BankValueDiffItem> items, Key? key, BankValueDiffStyle style = BankValueDiffStyle.inline, String? title, bool showDividers = true, EdgeInsetsGeometry? padding, @Deprecated('No longer rendered: 0.3.0 gave both BankValueDiffStyle variants one ' 'old-to-new grammar with no microlabels. Delete the argument; localise ' 'each row with BankValueDiffItem.semanticLabel. Removed in 0.5.0.') String previousLabel = 'Previous', @Deprecated('No longer rendered: 0.3.0 gave both BankValueDiffStyle variants one ' 'old-to-new grammar with no microlabels. Delete the argument; localise ' 'each row with BankValueDiffItem.semanticLabel. Removed in 0.5.0.') String newLabel = 'New', String addedLabel = 'Added', String removedLabel = 'Removed', Color? backgroundColor, BorderRadius? radius, Color? borderColor, Color? dividerColor, TextStyle? titleStyle, IconData? arrowIcon, Color? addedColor, Color? removedColor, Color? increaseColor, TextStyle? labelStyle, TextStyle? oldValueStyle, TextStyle? newValueStyle})
Creates a card of old-vs-new change rows.
const

Properties

addedColor Color?
See BankValueDiffRow.addedColor.
final
addedLabel String
See BankValueDiffRow.addedLabel.
final
arrowIcon IconData?
See BankValueDiffRow.arrowIcon.
final
backgroundColor Color?
Overrides the card background colour. Defaults to the theme surface.
final
borderColor Color?
Overrides the card border colour. Defaults to the theme outline.
final
dividerColor Color?
Overrides the inter-row divider colour. Defaults to the theme onSurface at 8% opacity.
final
hashCode int
The hash code for this object.
no setterinherited
increaseColor Color?
See BankValueDiffRow.increaseColor.
final
items List<BankValueDiffItem>
The changed fields to display, in order.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
labelStyle TextStyle?
See BankValueDiffRow.labelStyle.
final
newLabel String
No longer rendered, and no longer forwarded to the rows. See BankValueDiffRow.previousLabel for the migration.
final
newValueStyle TextStyle?
See BankValueDiffRow.newValueStyle.
final
oldValueStyle TextStyle?
See BankValueDiffRow.oldValueStyle.
final
padding EdgeInsetsGeometry?
Inner padding of the card. Defaults to BankTokens.space4 all round.
final
previousLabel String
No longer rendered, and no longer forwarded to the rows. See BankValueDiffRow.previousLabel for the migration.
final
radius BorderRadius?
Overrides the card corner radius. Defaults to the theme cardRadius.
final
removedColor Color?
See BankValueDiffRow.removedColor.
final
removedLabel String
See BankValueDiffRow.removedLabel.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
showDividers bool
Whether to draw a 1 px divider between consecutive rows.
final
style BankValueDiffStyle
Layout variant applied to every row.
final
title String?
Optional heading rendered above the rows.
final
titleStyle TextStyle?
Merged over the title style (BankTokens.labelLarge in 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