compareMouseAction method

bool compareMouseAction(
  1. dynamic action1,
  2. dynamic action2
)

Compare two mouse actions returns bool True if action1 and action 2 are the same mouse action, false otherwise

Implementation

bool compareMouseAction(action1, action2) {
    if (action1['operation'] == action2['operation']) {
      if (action1['mouse'] == action2['mouse'] &&
          action1['key'] == action2['key']) {
        return true;
      } else {
        return false;
      }
    } else {
      return false;
    }
  }