onSwipeLeft method
void
onSwipeLeft(
- dynamic offset
Implementation
void onSwipeLeft(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;
}