xand static method Null safety

bool xand(
  1. bool a,
  2. bool b
)

Implementation

static bool xand(bool a, bool b) {
  if ((a && b) || (!a && !b)) {
    return true;
  }
  return false;
}