BankScheduledTransferToggle class

Instant / Later / Recurring selector for a transfer, built on Flutter's built-in SegmentedButton.

When BankTransferTiming.later is selected and onDateChanged is non-null, a date-and-time picker row is shown below the segmented button.

When BankTransferTiming.recurring is selected and onRecurringPatternChanged is non-null, a dropdown for picking the recurrence pattern is shown.

BankScheduledTransferToggle(
  selected: _timing,
  onChanged: (t) => setState(() => _timing = t),
  scheduledDate: _scheduledDate,
  onDateChanged: (d) => setState(() => _scheduledDate = d),
  recurringPattern: _pattern,
  onRecurringPatternChanged: (p) => setState(() => _pattern = p),
)
Inheritance

Constructors

BankScheduledTransferToggle({required BankTransferTiming selected, required ValueChanged<BankTransferTiming> onChanged, Key? key, DateTime? scheduledDate, ValueChanged<DateTime>? onDateChanged, String? recurringPattern, ValueChanged<String>? onRecurringPatternChanged, String instantLabel = 'Instant', String laterLabel = 'Later', String recurringLabel = 'Recurring', List<String>? recurringOptions, String selectDateLabel = 'Select date & time', String datePickerHelpText = 'Select transfer date', String timePickerHelpText = 'Select transfer time', IconData? instantIcon, IconData? laterIcon, IconData? recurringIcon, IconData? calendarIcon, IconData? chevronIcon, IconData? dropdownIcon, Color? accentColor, BorderRadius? radius, Color? fieldColor, String? semanticLabel})
const

Properties

accentColor Color?
Overrides the selected segment background and the picker dialog primary color. Defaults to the theme primary.
final
calendarIcon IconData?
Overrides the date row glyph. Defaults to Icons.calendar_today_outlined.
final
chevronIcon IconData?
Overrides the date row trailing glyph. Defaults to Icons.chevron_right.
final
datePickerHelpText String
Help text of the date picker dialog. Defaults to 'Select transfer date'.
final
Overrides the dropdown glyph. Defaults to Icons.expand_more.
final
fieldColor Color?
Overrides the fill color of the date row and dropdown. Defaults to the theme surfaceVariant.
final
hashCode int
The hash code for this object.
no setterinherited
instantIcon IconData?
Overrides the instant segment glyph. Defaults to Icons.bolt_outlined.
final
instantLabel String
Label of the instant segment. Defaults to 'Instant'.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
laterIcon IconData?
Overrides the later segment glyph. Defaults to Icons.schedule_outlined.
final
laterLabel String
Label of the later segment. Defaults to 'Later'.
final
onChanged ValueChanged<BankTransferTiming>
Called when the user taps a different segment.
final
onDateChanged ValueChanged<DateTime>?
When non-null and BankTransferTiming.later is selected, a date-and-time picker row is rendered below the segmented button and this callback receives the chosen DateTime.
final
onRecurringPatternChanged ValueChanged<String>?
When non-null and BankTransferTiming.recurring is selected, a pattern dropdown is rendered below the segmented button.
final
radius BorderRadius?
Overrides the corner radius of the segments, date row, and dropdown. Defaults to the theme chipRadius.
final
recurringIcon IconData?
Overrides the recurring segment glyph. Defaults to Icons.repeat.
final
recurringLabel String
Label of the recurring segment. Defaults to 'Recurring'.
final
recurringOptions List<String>?
Options offered by the recurrence dropdown. Defaults to ['Daily', 'Weekly', 'Biweekly', 'Monthly'].
final
recurringPattern String?
The currently selected recurrence pattern for BankTransferTiming.recurring, e.g. 'Weekly' or 'Monthly'.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scheduledDate DateTime?
The currently selected scheduled date for BankTransferTiming.later. Displayed in the date-picker row when later timing is active.
final
selectDateLabel String
Placeholder of the date row before a date is picked. Defaults to 'Select date & time'.
final
selected BankTransferTiming
The currently selected BankTransferTiming value.
final
semanticLabel String?
Overrides the semantics label of the segmented button. Defaults to 'Transfer timing: <selection>'.
final
timePickerHelpText String
Help text of the time picker dialog. Defaults to 'Select transfer time'.
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