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) {
  U128Codec.codec
    ..encodeTo(
        (value & BigInt.parse('ffffffffffffffffffffffffffffffff', radix: 16))
            .toUnsigned(128),
        output)
    ..encodeTo((value >> 128).toUnsigned(128), output);
}