updateLetter method
void
updateLetter(
- String newLetter
)
Implementation
void updateLetter(String newLetter) {
if (lastLetter == 'A' && !lastWasTapped) {
errors += 1;
String s;
if (letterIndex == mocaLetterList.length) {
s = '${mocaLetterList.getRange(0, letterIndex - 2)} >A< ${mocaLetterList.getRange(letterIndex - 1, mocaLetterList.length)}';
} else {
s = '${mocaLetterList.getRange(0, letterIndex - 2)} >A< ${mocaLetterList.getRange(letterIndex - 1, mocaLetterList.length)}';
}
widget.eventLogger
.addWrongGesture('Missed button tap', 'Did not press button on: $s');
}
lastWasTapped = wasTapped;
wasTapped = false;
lastLetter = currentLetter;
currentLetter = newLetter;
}