generateRandomBinary method

String generateRandomBinary([
  1. int length = 1
])

Implementation

String generateRandomBinary([int length = 1]) {
  return List.generate(length, (index) => generateRandomDigit(0, 1)).join();
}