BankTransferLimitManager class
Per-channel transfer limit editor, generalizing the spend-limit
slider inside BankCardControlsPanel.
Each channel renders its icon and label, a thin used/limit progress bar (danger-tinted beyond 90 %), and a slider with live formatted-money value snapping to sensible increments. Raising a limit above its current value can require strong customer authentication via onScaRequired: on refusal the slider animates back. Commits debounce 400 ms before firing onChanged.
BankTransferLimitManager(
channels: channels,
onChanged: (id, limit) => api.setLimit(id, limit),
onScaRequired: () async =>
await BankScaApprovalSheet.show(...) ?? false,
)
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- BankTransferLimitManager
Constructors
-
BankTransferLimitManager({required List<
BankLimitChannel> channels, required void onChanged(String channelId, Money newLimit), Key? key, bool requireScaAboveCurrent = true, Future<bool> onScaRequired()?, EdgeInsetsGeometry? padding, Color? accentColor, Color? trackColor, TextStyle? titleStyle, TextStyle? amountStyle, Duration? debounceDuration}) -
const
Properties
- accentColor → Color?
-
Tint of the channel icon, progress bar, and slider. Defaults to
the theme primary.
final
- amountStyle → TextStyle?
-
Merged over the computed live limit-amount style.
final
-
channels
→ List<
BankLimitChannel> -
final
- debounceDuration → Duration?
-
Delay between the slider commit and onChanged firing.
Defaults to 400 ms.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- onChanged → void Function(String channelId, Money newLimit)
-
Fired (debounced, see debounceDuration) when a channel's limit
changes.
final
-
onScaRequired
→ Future<
bool> Function()? -
Host presents an SCA challenge (e.g.
BankScaApprovalSheet) and resolves whether it passed.final - padding → EdgeInsetsGeometry?
-
Overrides each channel row's padding. Defaults to horizontal
BankTokens.space4 and vertical BankTokens.space3.
final
- requireScaAboveCurrent → bool
-
When true, raising a limit above its configured value awaits
onScaRequired before committing.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- titleStyle → TextStyle?
-
Merged over the computed channel-label style.
final
- trackColor → Color?
-
Track colour behind the progress bar and slider. Defaults to the
theme surface-variant colour.
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