BankCallVerificationScreen class

An anti-vishing call verification surface: a live answer to "is this call really from my bank?".

Place it behind a prominent security entry point so a customer who receives a suspicious phone call can immediately check whether the bank is really calling:

A refresh IconButton appears when onRefresh is provided; tapping it spins the icon once (skipped when animations are disabled) and invokes the callback. Status changes are announced to assistive technology via a liveRegion around the headline and body copy.

The screen intentionally uses only plain surface colours and full-strength semantic colours (no gradients, glows, or decorative tints) so it stays legible under every preset, including high-contrast themes.

All user-facing copy can be overridden through constructor parameters for localisation; English defaults are built in.

BankCallVerificationScreen(
  status: BankCallStatus.activeCall,
  agentName: 'Amira Hassan',
  agentId: 'AH-2041',
  callStartedAt: DateTime.now(),
  bankName: 'Vault Bank',
  onReportScam: () => openScamReportFlow(),
  onRefresh: () => bloc.add(const RefreshCallStatusEvent()),
)
Inheritance

Constructors

BankCallVerificationScreen({required BankCallStatus status, Key? key, String? agentName, String? agentId, DateTime? callStartedAt, VoidCallback? onReportScam, VoidCallback? onRefresh, String bankName = 'your bank', String screenTitle = 'Call status', String noCallHeadline = 'We are NOT calling you', String? noCallBody, String? activeCallHeadline, String? activeCallBody, String recentCallHeadline = 'Your last call was verified', String? recentCallBody, String reportScamLabel = 'Report a scam call', String refreshLabel = 'Refresh call status', String staffIdLabel = 'Staff ID', String callStartedLabel = 'Call started', EdgeInsetsGeometry? padding, Color? accentColor, IconData? noCallIcon, IconData? activeCallIcon, IconData? recentCallIcon, IconData? refreshIcon, TextStyle? titleStyle, TextStyle? headlineStyle, TextStyle? bodyStyle, Color? cardColor, BorderRadius? cardRadius, double? illustrationSize, double? illustrationIconSize, Color? reportButtonColor, Color? reportButtonForegroundColor, Duration? animationDuration, Curve? animationCurve})
const

Properties

accentColor Color?
Overrides the per-status accent colour (illustration tint and glyph). Defaults to the status-appropriate semantic colour.
final
activeCallBody String?
Reassurance copy for the BankCallStatus.activeCall state.
final
activeCallHeadline String?
Headline for the BankCallStatus.activeCall state. Defaults to 'You are speaking with $bankName'.
final
activeCallIcon IconData?
Overrides the BankCallStatus.activeCall glyph. Defaults to Icons.verified_user_outlined.
final
agentId String?
Internal staff identifier of the agent, shown on the agent card so the customer can quote it back to the bank.
final
agentName String?
Display name of the agent on the (current or most recent) verified call. Shown on the agent card and used for the BankEmblem initials.
final
animationCurve Curve?
Overrides the refresh spin curve. Defaults to BankTokens.curveEmphasized.
final
animationDuration Duration?
Overrides the refresh spin duration. Defaults to BankTokens.durationXSlow.
final
bankName String
The bank's display name, interpolated into the default copy.
final
bodyStyle TextStyle?
Merged over the computed status body style (BankTokens.bodyMedium).
final
callStartedAt DateTime?
When the (current or most recent) verified call started.
final
callStartedLabel String
Label prefixed to the formatted callStartedAt on the agent card.
final
cardColor Color?
Overrides the agent card background. Defaults to BankThemeData.surfaceVariant.
final
cardRadius BorderRadius?
Overrides the agent card corner radius. Defaults to BankThemeData.cardRadius.
final
hashCode int
The hash code for this object.
no setterinherited
headlineStyle TextStyle?
Merged over the computed status headline style (BankTokens.headlineMedium, bold).
final
illustrationIconSize double?
Overrides the illustration glyph size. Defaults to 48.
final
illustrationSize double?
Overrides the illustration circle diameter. Defaults to 96.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
noCallBody String?
Body copy for the BankCallStatus.noActiveCall state. Defaults to a warning that any current caller is a scammer.
final
noCallHeadline String
Headline for the BankCallStatus.noActiveCall state.
final
noCallIcon IconData?
Overrides the BankCallStatus.noActiveCall glyph. Defaults to BankIcons.fraud.
final
onRefresh VoidCallback?
Called when the customer taps the refresh button. When null the refresh button is not shown.
final
onReportScam VoidCallback?
Called when the customer taps the danger report button in the BankCallStatus.noActiveCall state. When null the button renders disabled.
final
padding EdgeInsetsGeometry?
Overrides the outer scroll padding. Defaults to BankTokens.space6 on all sides.
final
recentCallBody String?
Body copy for the BankCallStatus.recentCall state.
final
recentCallHeadline String
Headline for the BankCallStatus.recentCall state.
final
recentCallIcon IconData?
Overrides the BankCallStatus.recentCall glyph. Defaults to BankIcons.schedule.
final
refreshIcon IconData?
Overrides the refresh button glyph. Defaults to Icons.refresh.
final
refreshLabel String
Tooltip and semantics label for the refresh button.
final
reportButtonColor Color?
Overrides the report button background. Defaults to BankTokens.danger.
final
reportButtonForegroundColor Color?
Overrides the report button label colour. Defaults to white.
final
reportScamLabel String
Label for the danger report button.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
screenTitle String
Heading shown at the top of the screen.
final
staffIdLabel String
Label prefixed to agentId on the agent card.
final
status BankCallStatus
The verified call state to display.
final
titleStyle TextStyle?
Merged over the computed screenTitle style (BankTokens.headlineSmall).
final

Methods

createElement() StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() State<BankCallVerificationScreen>
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