AccountResourceModel constructor

AccountResourceModel({
  1. required BigInt freeNetUsed,
  2. required BigInt freeNetLimit,
  3. required BigInt netLimit,
  4. required BigInt netUsed,
  5. required BigInt energyLimit,
  6. required BigInt energyUsed,
  7. required int tronPowerLimit,
  8. required int tronPowerUsed,
})

Implementation

AccountResourceModel({
  required this.freeNetUsed,
  required this.freeNetLimit,
  required this.netLimit,
  required this.netUsed,
  required this.energyLimit,
  required this.energyUsed,
  required this.tronPowerLimit,
  required this.tronPowerUsed,
}) {
  totalBandWith = freeNetLimit + netLimit;
  totalBandWithUsed = netUsed + freeNetUsed;
  howManyEnergy = energyLimit - energyUsed;
  if (howManyEnergy < BigInt.zero) {
    howManyEnergy = BigInt.zero;
  }
}