onSwipeRight method
void
onSwipeRight(
- 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;
}