encodeTo method

  1. @override
void encodeTo(
  1. List<int> value,
  2. Output output
)
override

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

Implementation

@override
void encodeTo(List<int> value, Output output) {
  if (value.length != length) {
    throw Exception(
        'I64ArrayCodec: invalid length, expect $length found ${value.length}');
  }
  for (final val in value) {
    I64Codec.codec.encodeTo(BigInt.from(val), output);
  }
}