bool arraysEqual(Map<int, dynamic> a, b) { if (a.keys.length != b.length) return false; for (int i = 0, l = a.keys.length; i < l; i++) { if (a[i] != b[i]) return false; } return true; }