toBinaryBool static method
Implementation
static List<bool> toBinaryBool(BigInt value, {int? bitLength}) {
bitLength ??= bitlengthInBytes(value) * 8;
// Make sure we have exactly 64 bits
final bits = List<bool>.filled(bitLength, false);
for (int i = 0; i < bitLength; i++) {
// Check if the i-th bit is set
bits[i] = value & (BigInt.one << i) != BigInt.zero;
}
return bits;
}