-
-
Save MarcinusX/6cb524656872906d8cd3b16ee73a4bef 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
class _MainPageState extends State<MainPage> with SingleTickerProviderStateMixin { | |
... | |
void _onTap(Note note) { | |
setState(() { | |
note.state = NoteState.tapped; //<--set note state to tapped | |
}); | |
} | |
_drawLine(int lineNumber) { | |
return Expanded( | |
child: Line( | |
lineNumber: lineNumber, | |
currentNotes: notes.sublist(currentNoteIndex, currentNoteIndex + 5), | |
onTileTap: _onTap, //<--specify onTap callback | |
animation: animationController, | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment