isBinary static method

bool isBinary(
  1. String s
)

Checks if string is binary.

Implementation

static bool isBinary(String s) => hasMatch(s, r'^[0-1]+$');