From b26636d400fffb5f3764009494970fc2a96b4a6e Mon Sep 17 00:00:00 2001 From: h7x4 Date: Fri, 4 Feb 2022 15:17:45 +0100 Subject: [PATCH] change next card logic for kanji --- lib/screens/practise/kanji.dart | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/screens/practise/kanji.dart b/lib/screens/practise/kanji.dart index 2b1a000..cc9a0b9 100644 --- a/lib/screens/practise/kanji.dart +++ b/lib/screens/practise/kanji.dart @@ -104,9 +104,11 @@ class _KanjiPageState extends State { setState(() => isPressed = !isPressed); }, onNextCard: () => setState(() { - controller.clear(); - isPressed = false; - widget.onNextCard(); + if (isPressed) { + controller.clear(); + widget.onNextCard(); + } + setState(() => isPressed = !isPressed); }), onPreviousCard: () => setState(() { controller.clear();