diff static method

int diff(
  1. dynamic a1,
  2. dynamic a2
)

Get diff from two modes

Implementation

static int diff(dynamic a1, dynamic a2) {
  var a1d = AccessMode.decode(a1) ?? 0;
  var a2d = AccessMode.decode(a2) ?? 0;

  if (a1d == INVALID || a2d == INVALID) {
    return INVALID;
  }
  return a1d & ~a2d;
}