BankMoneyCircleCard class

Summary card for one money circle: a digitized rotating savings circle (ROSCA, "jamiyah") where every member contributes a fixed amount each cycle and one member, by turn order, collects the pot.

The card shows the circle name, the monthly contribution, the pot per cycle (contribution multiplied by member count) as the hero amount, a horizontal turn tracker of member avatars in turn order, the next collection date, the signed-in user's turn, and a payment status strip for the current cycle. All money rendering goes through BankBalanceText, so privacy mode masks automatically.

Set isAdminView to true for the circle administrator: unpaid members receive a quiet warning tint in the tracker and the onRemind action becomes available.

When currentCycle exceeds totalCycles the circle is complete and the card swaps the schedule details for a celebratory line.

BankMoneyCircleCard(
  name: 'Family circle',
  contribution: Money.fromDouble(100, 'BHD'),
  members: members,
  currentCycle: 3,
  totalCycles: 8,
  nextCollectionDate: DateTime(2026, 8, 1),
  isAdminView: true,
  onRemind: sendReminders,
  onViewDetails: openCircleDetails,
)
Inheritance

Constructors

BankMoneyCircleCard({required String name, required Money contribution, required List<BankCircleMember> members, required int currentCycle, required int totalCycles, required DateTime nextCollectionDate, Key? key, bool isAdminView = false, VoidCallback? onRemind, VoidCallback? onViewDetails, String potPerCycleLabel = 'Pot per cycle', String monthlyContributionLabel = 'Monthly contribution', String nextCollectionLabel = 'Next collection', String myTurnTemplate = 'Your turn: {month} ({n} of {total})', String paidTemplate = '{paid} of {total} paid', String cycleTemplate = 'Cycle {n} of {total}', String meLabel = 'You', String dueLabel = 'Due', String remindLabel = 'Send reminder', String viewDetailsLabel = 'View details', String completedLabel = 'Circle complete. Every member has received ' 'the pot.', String? semanticLabel, EdgeInsetsGeometry? padding, BorderRadius? radius, Color? backgroundColor, Color? accentColor, List<BoxShadow>? shadow, TextStyle? titleStyle, TextStyle? subtitleStyle, TextStyle? amountStyle, Widget? header, Widget? footer, IconData? collectionDateIcon, IconData? paidBadgeIcon, IconData? completedIcon, double? avatarSize})
Creates a money-circle summary card.
const

Properties

accentColor Color?
Overrides the accent used for the current-turn ring, cycle chip, me chip, my-turn line, and progress bar. Defaults to BankThemeData.primary.
final
amountStyle TextStyle?
Merged over the computed hero pot amount style (BankThemeData.numeralLarge in onSurface).
final
avatarSize double?
Avatar diameter in the turn tracker. Defaults to 40.
final
backgroundColor Color?
Overrides the card background. Defaults to BankThemeData.surface.
final
collectionDateIcon IconData?
Icon beside the next collection date. Defaults to BankIcons.calendar.
final
completedIcon IconData?
Icon beside the completed line. Defaults to a celebration glyph.
final
completedLabel String
Celebratory line shown when the circle is complete.
final
contribution Money
Fixed contribution each member pays per cycle.
final
currentCycle int
1-based index of the cycle currently being collected.
final
cycleTemplate String
Template for the cycle chip. {n} and {total} are substituted. Defaults to 'Cycle {n} of {total}'.
final
dueLabel String
Label inside the due pill shown while the user's contribution is still owed this cycle. Defaults to 'Due'.
final
Optional slot rendered below the card content.
final
hashCode int
The hash code for this object.
no setterinherited
Optional slot rendered above the card content.
final
isAdminView bool
Whether the admin view is shown: unpaid members get a quiet warning tint and onRemind becomes available. Defaults to false.
final
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
meLabel String
Chip label under the signed-in user's avatar. Defaults to 'You'.
final
members List<BankCircleMember>
All circle members. Rendered in BankCircleMember.turnIndex order.
final
monthlyContributionLabel String
Label for the per-member contribution row. Defaults to 'Monthly contribution'.
final
myTurnTemplate String
Template for the signed-in user's turn line. {month}, {n}, and {total} are substituted. Defaults to 'Your turn: {month} ({n} of {total})'.
final
name String
Display name of the circle.
final
nextCollectionDate DateTime
Date the current cycle's pot is collected.
final
nextCollectionLabel String
Label for the next collection date row. Defaults to 'Next collection'.
final
onRemind VoidCallback?
Called when the admin taps the reminder action. Only rendered when isAdminView is true and the circle is not complete.
final
onViewDetails VoidCallback?
Called when the user taps the view-details action.
final
padding EdgeInsetsGeometry?
Overrides the content padding. Defaults to EdgeInsets.all(BankTokens.space4).
final
paidBadgeIcon IconData?
Icon inside the paid check badge on past turns. Defaults to a plain check mark.
final
paidTemplate String
Template for the payment status strip. {paid} and {total} are substituted. Defaults to '{paid} of {total} paid'.
final
potPerCycleLabel String
Label above the hero pot amount. Defaults to 'Pot per cycle'.
final
radius BorderRadius?
Overrides the card corner radius. Defaults to BankThemeData.cardRadius.
final
remindLabel String
Label of the admin reminder action. Defaults to 'Send reminder'.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
semanticLabel String?
Overrides the merged semantics summary (name, pot, turn, next collection). Defaults to a label built from the resolved strings.
final
shadow List<BoxShadow>?
Overrides the card shadow. Defaults to BankTokens.shadowCard; pass const [] to flatten the card.
final
subtitleStyle TextStyle?
Merged over the computed supporting-label style (BankTokens.bodySmall in onSurfaceVariant).
final
titleStyle TextStyle?
Merged over the computed circle-name style (BankTokens.headlineSmall in onSurface).
final
totalCycles int
Total number of cycles (normally the member count).
final
viewDetailsLabel String
Label of the view-details action. Defaults to 'View details'.
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