onSwipe method
Implementation
void onSwipe(String swiped) {
if (direction == swiped) {
flankerState.rightSwipe++;
(congruent ? flankerState.congruentTimes : flankerState.incongruentTimes)
.add(flankerState.flankerSeconds);
} else {
flankerState.wrongSwipe++;
}
flankerState.flankerSeconds = 0;
if (++flankerState.flankerScore ==
flankerState.widget.activity.numberOfCards) {
flankerState.finish();
}
}