Halving class

Represents a Halving event with associated information.

The Halving class contains properties blocks and days representing the remaining blocks until the next Halving and the corresponding time remaining in days, respectively. The class provides a constructor for creating Halving objects, and a getHalvingTimer method for calculating the time remaining until the next Halving based on the provided lastBlock.

Properties:

  • blocks: The remaining blocks until the next Halving event.
  • days: The remaining time in days until the next Halving event.

Constructor:

  • Takes optional parameters blocks and days, initialized to 0 by default.

Methods:

  • getHalvingTimer Calculates the remaining blocks and days until the next Halving event based on the provided lastBlock. It considers predefined block intervals for Halving and returns a new Halving object with the calculated values.

Constructors

Halving({int blocks = 0, int days = 0})

Properties

blocks int
getter/setter pair
days int
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

getHalvingTimer(int lastBlock) Halving
Calculates the remaining blocks and days until the next Halving event.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited