change next card logic for kanji

This commit is contained in:
Oystein Kristoffer Tveit 2022-02-04 15:17:45 +01:00
parent d6fb9caa63
commit b26636d400
1 changed files with 5 additions and 3 deletions

View File

@ -104,9 +104,11 @@ class _KanjiPageState extends State<KanjiPage> {
setState(() => isPressed = !isPressed);
},
onNextCard: () => setState(() {
if (isPressed) {
controller.clear();
isPressed = false;
widget.onNextCard();
}
setState(() => isPressed = !isPressed);
}),
onPreviousCard: () => setState(() {
controller.clear();