onSwipeRight method

void onSwipeRight(
  1. dynamic offset
)

Implementation

void onSwipeRight(offset) {
  if (direction == '→') {
    flankerState.rightSwipe++;
    if (congruent) {
      flankerState.congruentTimes.add(flankerState.flankerSeconds);
    } else {
      flankerState.incongruentTimes.add(flankerState.flankerSeconds);
    }
  } else {
    flankerState.wrongSwipe++;
  }
  flankerState.flankerScore++;
  flankerState.flankerSeconds = 0;
}