BankReceiptView class
Shareable receipt layout. The package renders the view; the host app wires up PDF generation or share-sheet logic.
Wrap in a RepaintBoundary and call toImage() for PDF export.
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- BankReceiptView
Constructors
-
BankReceiptView({required Transaction transaction, Key? key, String? fromAccountName, String? toName, String? referenceNumber, VoidCallback? onExport, Widget? logoSlot, EdgeInsetsGeometry? padding, BorderRadius? radius, Color? backgroundColor, List<
BoxShadow> ? shadow, Color? dividerColor, Color? accentColor, TextStyle? titleStyle, TextStyle? subtitleStyle, TextStyle? merchantStyle, TextStyle? amountStyle, TextStyle? rowLabelStyle, TextStyle? rowValueStyle, String titleText = 'Receipt', String fromLabel = 'From', String toLabel = 'To', String referenceLabel = 'Reference', String categoryLabel = 'Category', String statusRowLabel = 'Status', String transactionIdLabel = 'Transaction ID', String qrLabel = 'QR code', String exportLabel = 'Export Receipt', String exportSemanticLabel = 'Export receipt', String? semanticLabel, String categoryLabelBuilder(TransactionCategory)?, IconData? qrIcon, IconData? exportIcon}) -
const
Properties
- accentColor → Color?
-
Overrides the export button background. Defaults to theme primary.
final
- amountStyle → TextStyle?
-
Merged over the hero amount style (BankTokens.numeralHero).
final
- backgroundColor → Color?
-
Overrides the paper color. Defaults to white.
final
- categoryLabel → String
-
Overrides the category row label. Defaults to 'Category'.
final
- categoryLabelBuilder → String Function(TransactionCategory)?
-
Overrides the category display name. Defaults to built-in
English labels.
final
- dividerColor → Color?
-
Overrides the dashed divider color. Defaults to a light grey.
final
- exportIcon → IconData?
-
Overrides the export button glyph. Defaults to BankIcons.share.
final
- exportLabel → String
-
Overrides the export button text. Defaults to 'Export Receipt'.
final
- exportSemanticLabel → String
-
Overrides the export button semantics. Defaults to
'Export receipt'.
final
- fromAccountName → String?
-
final
- fromLabel → String
-
Overrides the sender row label. Defaults to 'From'.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- logoSlot → Widget?
-
Optional brand logo shown at the top of the receipt.
final
- merchantStyle → TextStyle?
-
Merged over the merchant name style (BankTokens.labelLarge).
final
- onExport → VoidCallback?
-
final
- padding → EdgeInsetsGeometry?
-
Overrides the padding of each receipt section. Defaults to
BankTokens.space6 on all sides.
final
- qrIcon → IconData?
-
Overrides the QR placeholder glyph. Defaults to BankIcons.scan.
final
- qrLabel → String
-
Overrides the QR placeholder caption. Defaults to 'QR code'.
final
- radius → BorderRadius?
-
Overrides the receipt corner radius. Defaults to
BankTokens.radiusMedium.
final
- referenceLabel → String
-
Overrides the reference row label. Defaults to 'Reference'.
final
- referenceNumber → String?
-
final
- rowLabelStyle → TextStyle?
-
Merged over the detail row label style (BankTokens.bodySmall).
final
- rowValueStyle → TextStyle?
-
Merged over the detail row value style (BankTokens.bodyMedium).
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- semanticLabel → String?
-
Overrides the receipt semantics label. Defaults to
'Receipt for merchant, amount'.
final
-
shadow
→ List<
BoxShadow> ? -
Overrides the drop shadow. Defaults to a soft black shadow;
pass const [] to flatten.
final
- statusRowLabel → String
-
Overrides the status row label. Defaults to 'Status'.
final
- subtitleStyle → TextStyle?
-
Merged over the date line style (BankTokens.bodySmall).
final
- titleStyle → TextStyle?
-
Merged over the receipt heading style (BankTokens.headlineMedium).
final
- titleText → String
-
Overrides the receipt heading. Defaults to 'Receipt'.
final
- toLabel → String
-
Overrides the recipient row label. Defaults to 'To'.
final
- toName → String?
-
final
- transaction → Transaction
-
final
- transactionIdLabel → String
-
Overrides the transaction id row label. Defaults to
'Transaction ID'.
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