-
-
Save MarcinusX/33a6253419a79db8edd337ceebdbca6f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void _onTap(Note note) { | |
bool areAllPreviousTapped = notes | |
.sublist(0, note.orderNumber) | |
.every((n) => n.state == NoteState.tapped); | |
if (areAllPreviousTapped) { | |
setState(() { | |
note.state = NoteState.tapped; | |
++points; | |
}); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment