change next card logic for kanji
This commit is contained in:
parent
d6fb9caa63
commit
b26636d400
|
@ -104,9 +104,11 @@ class _KanjiPageState extends State<KanjiPage> {
|
||||||
setState(() => isPressed = !isPressed);
|
setState(() => isPressed = !isPressed);
|
||||||
},
|
},
|
||||||
onNextCard: () => setState(() {
|
onNextCard: () => setState(() {
|
||||||
|
if (isPressed) {
|
||||||
controller.clear();
|
controller.clear();
|
||||||
isPressed = false;
|
|
||||||
widget.onNextCard();
|
widget.onNextCard();
|
||||||
|
}
|
||||||
|
setState(() => isPressed = !isPressed);
|
||||||
}),
|
}),
|
||||||
onPreviousCard: () => setState(() {
|
onPreviousCard: () => setState(() {
|
||||||
controller.clear();
|
controller.clear();
|
||||||
|
|
Loading…
Reference in New Issue