BitMatrix constructor

BitMatrix(
  1. int _width, [
  2. int? height
])

Creates an empty BitMatrix.

@param width bit matrix width @param height bit matrix height

Implementation

BitMatrix(this._width, [int? height])
    : _height = height ?? _width,
      _rowSize = (_width + 31) ~/ 32,
      _bits = Uint32List(((_width + 31) ~/ 32) * (height ?? _width)) {
  if (_width < 1 || _height < 1) {
    throw ArgumentError('Both dimensions must be greater than 0');
  }
}