encodeTo method

  1. @override
void encodeTo(
  1. BigInt value,
  2. Output output
)
override

Convert self to a slice and append it to the destination.

Implementation

@override
void encodeTo(BigInt value, Output output) {
  if (value < BigInt.parse('-170141183460469231731687303715884105728') ||
      value > BigInt.parse('170141183460469231731687303715884105727')) {
    throw OutOfBoundsException();
  }
  U128Codec.codec.encodeTo(value.toUnsigned(128), output);
}