isAlignedTo method

bool isAlignedTo(
  1. int alignment
)

Returns true if the byte count is aligned to alignment bytes.

Implementation

bool isAlignedTo(int alignment) {
  if (alignment <= 0) throw ArgumentError('Alignment must be positive');
  return _converter.bytes.toInt() % alignment == 0;
}