toBinaryString method

String toBinaryString()

Creates a string of 0s and 1s of the content of the array.

Implementation

String toBinaryString() {
  final sb = StringBuffer();
  for (var i = 0; i < length; i++) {
    sb.write(this[i] ? '1' : '0');
  }
  return sb.toString();
}