BitField<T extends dynamic>.filled constructor

BitField<T extends dynamic>.filled(int _length, bool value)

Creates a bit field filled with a particular value.

If the value argument is true, the bits are filled with ones. Otherwise, the bits are filled with zeros.

The given length must be at most 62.

Implementation

BitField.filled(this._length, bool value)
  : assert(_length <= _smiBits),
    _bits = value ? _allOnes : _allZeros;