Returns true if str contains only binary digits (0 and 1).
true
str
0
1
bool isBinary(String str) => binaryReg.hasMatch(str);