intToBigEndianBytes static method
Return a Uint8List of big endian bytes representing an integer.
Implementation
static Uint8List intToBigEndianBytes(
final int value, {
final int length = 8,
}) {
final Uint8List result = Uint8List(length);
for (int i = 0; i < length; i++) {
result[length - 1 - i] = (value >> (8 * i)) & 0xff;
}
return result;
}