EtherAmount.fromBigInt constructor

EtherAmount.fromBigInt(
  1. EtherUnit unit,
  2. BigInt amount
)

Constructs an amount of Ether by a unit and its amount.

Implementation

factory EtherAmount.fromBigInt(EtherUnit unit, BigInt amount) {
  final wei = _factors[unit]! * amount;

  return EtherAmount.inWei(wei);
}