BankBillForecastList class
A predicted-upcoming-bills list: the bill-prediction pattern found in leading banking apps.
Shows a header with a title, the summed predicted total for the
period (rendered through BankBalanceText so privacy mode masks it),
and an optional See all action. Forecast rows are grouped by week with
subtle section labels (This week, Next week, Later) and show the biller
emblem, the expected date, and the predicted amount on the trailing
edge. Low-confidence predictions (confidence below 0.8) render with a
~ prefix and a secondary numeral style; confirmed rows drop the ~
and read as certain.
Use it on a payments hub or cashflow screen to warn customers about money that is expected to leave their account soon.
BankBillForecastList(
forecasts: forecasts,
currencyCode: 'USD',
onTap: openForecast,
onSeeAll: openAllForecasts,
)
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatelessWidget
- BankBillForecastList
Constructors
-
BankBillForecastList({required List<
BankBillForecast> forecasts, required String currencyCode, Key? key, void onTap(BankBillForecast forecast)?, VoidCallback? onSeeAll, String title = 'Upcoming bills', String totalTemplate = '{total} expected this month', String expectedPrefix = 'Expected', String seeAllLabel = 'See all', String thisWeekLabel = 'This week', String nextWeekLabel = 'Next week', String laterLabel = 'Later', String emptyLabel = 'No upcoming bills predicted', DateTime? now, BorderRadius? radius, Color? backgroundColor, List<BoxShadow> ? shadow, BoxBorder? border, Color? accentColor, TextStyle? titleStyle, TextStyle? subtitleStyle, TextStyle? amountStyle}) -
const
Properties
- accentColor → Color?
-
Tint of the See all header action. Defaults to the theme primary.
final
- amountStyle → TextStyle?
-
Merged over the computed row-amount style.
final
- backgroundColor → Color?
-
Overrides the card background. Defaults to the theme surface.
final
- border → BoxBorder?
-
Overrides the card outline. Defaults on dark surfaces to a
BankTokens.hairlineWidth hairline in BankTokens.hairlineColor;
light surfaces keep an invisible border of the same width. Pass
const Border()to remove it.final - currencyCode → String
-
ISO 4217 code used for the summed total. Every forecast's
BankBillForecast.predictedAmount must use this currency.
final
- emptyLabel → String
-
Placeholder text shown when forecasts is empty.
final
- expectedPrefix → String
-
Word placed before the formatted expected date on each row.
final
-
forecasts
→ List<
BankBillForecast> -
The predicted bills to display, in any order; rows are sorted by
BankBillForecast.expectedDate and grouped by week internally.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- laterLabel → String
-
Section label for bills expected after next week.
final
- nextWeekLabel → String
-
Section label for bills expected next week.
final
- now → DateTime?
-
Reference date used for week grouping. Defaults to
DateTime.now(); override for deterministic rendering in tests and previews.final - onSeeAll → VoidCallback?
-
Shows a See all action in the header when non-null.
final
- onTap → void Function(BankBillForecast forecast)?
-
Called with the tapped forecast row.
final
- radius → BorderRadius?
-
Overrides the card corner radius. Defaults to the theme card
radius.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- seeAllLabel → String
-
Label of the See all header action.
final
-
shadow
→ List<
BoxShadow> ? -
Overrides the card shadow. Defaults to BankTokens.shadowCardFor of
the theme background brightness; pass
const []to flatten the card.final - subtitleStyle → TextStyle?
-
Merged over the computed summary-line style.
final
- thisWeekLabel → String
-
Section label for bills expected in the current week.
final
- title → String
-
Header title.
final
- titleStyle → TextStyle?
-
Merged over the computed header-title style.
final
- totalTemplate → String
-
Template for the summary line under the title. The
{total}placeholder is replaced by the summed amount, rendered through BankBalanceText so privacy mode masks it.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