Uint<T extends Uint<T> > constructor
Uint<T extends Uint<T> > ({})
Implementation
Uint(
{required this.numberOfBytesRequired,
required this.constructorCallback,
required int value})
: _value = ByteData(numberOfBytesRequired) {
// calculate the negation mask once
const int baseMask = 0xff;
int tmpMask = 0xff;
for (int i = 1; i < numberOfBytesRequired; i++) {
tmpMask <<= 8;
tmpMask |= baseMask;
}
negationMask = ~tmpMask;
// set the actual value using the in the subclass specified setter
this.value = value;
}