BankReferralInviteCard class

Referral invite card with shareable code, reward description, and pending / rewarded / expired state handling.

Inheritance

Constructors

BankReferralInviteCard({required String referralCode, Key? key, String? rewardDescription, int referralCount = 0, int? maxReferrals, BankReferralState state = BankReferralState.pending, VoidCallback? onShare, VoidCallback? onCopyCode, EdgeInsetsGeometry? padding, BorderRadius? radius, Color? backgroundColor, Color? accentColor, TextStyle? titleStyle, TextStyle? codeStyle, String title = 'Invite Friends', String shareLabel = 'Share Invite', String rewardedLabel = 'Rewarded', String expiredLabel = 'Offer Expired', String? countLabel, IconData? giftIcon, IconData? shareIcon, IconData? copyIcon, IconData? rewardedIcon, String? semanticLabel})
const

Properties

accentColor Color?
Overrides the accent used for the gift icon, card border, copy icon and share button. Defaults to the theme primary.
final
backgroundColor Color?
Overrides the card background. Defaults to the accent at 8% alpha.
final
codeStyle TextStyle?
Merged over the referral-code style (BankTokens.numeralMedium in monospace).
final
copyIcon IconData?
Glyph of the copy-code affordance. Defaults to Icons.copy_outlined.
final
countLabel String?
Replaces the generated invite-count line ('<n> friends invited [of <max>]'). Supply for localisation.
final
expiredLabel String
Expired overlay text. Defaults to 'Offer Expired'.
final
giftIcon IconData?
Glyph next to the heading. Defaults to BankIcons.gift.
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
maxReferrals int?
final
onCopyCode VoidCallback?
final
onShare VoidCallback?
final
padding EdgeInsetsGeometry?
Overrides the card content padding. Defaults to EdgeInsets.all(BankTokens.space4).
final
radius BorderRadius?
Overrides the card corner radius. Defaults to the theme cardRadius.
final
referralCode String
final
referralCount int
final
rewardDescription String?
final
rewardedIcon IconData?
Glyph inside the rewarded badge. Defaults to Icons.check_circle.
final
rewardedLabel String
Rewarded overlay badge text. Defaults to 'Rewarded'.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
semanticLabel String?
Overrides the generated card semantics label. Supply for non-English locales.
final
shareIcon IconData?
Glyph on the share button. Defaults to BankIcons.share.
final
shareLabel String
Share button label. Defaults to 'Share Invite'.
final
state BankReferralState
final
title String
Card heading. Defaults to 'Invite Friends'.
final
titleStyle TextStyle?
Merged over the heading style (BankTokens.headlineSmall).
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