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');
  final a = BigInt.from(alignment);
  return _converter.bytes % a == BigInt.zero;
}