BudgetClock class

Shows all players' remaining time banks side by side for budget (accumulated clock) games.

Each cell is independently computed via PlayerTimerBuilder, so only the cell whose value changed triggers a rebuild. Inactive players' banks are static until the next observation arrives. Any bank below 60 seconds turns ColorScheme.error.

The clock stays truthful (unlike the per-action countdown, it is not pulled earlier by a soft margin; that would make a chess-style clock snap back up on submit). Instead, the local player's own cell shows a "Submit!" cue once their remaining bank drops into the final-headroom zone (softDeadlineMarginFor), nudging them to commit before latency carries the move past the deadline. The server grace window does the actual protecting.

When offline all cells freeze at their last known values and the active cell renders as inactive so it doesn't falsely suggest time is draining.

Inheritance

Constructors

BudgetClock({Key? key, required List<int> playerTimes, required int? deadline, required List<int> pendingPlayers, required int myPlayerIndex})
const

Properties

deadline int?
Absolute server deadline for the acting seat's bank, epoch milliseconds. Null in an untimed phase.
final
hashCode int
The hash code for this object.
no setterinherited
key Key?
Controls how one widget replaces another widget in the tree.
finalinherited
myPlayerIndex int
This client's player index; their cell is labelled "You".
final
pendingPlayers List<int>
Indices of currently active (draining) players.
final
playerTimes List<int>
Remaining time in milliseconds per player, 0-indexed.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

build(BuildContext context, WidgetRef ref) Widget
Describes the part of the user interface represented by this widget.
createElement() → ConsumerStatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → _ConsumerState
Creates the mutable state for this widget at a given 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