Skip to content

Instantly share code, notes, and snippets.

@MarcinusX
Created January 13, 2019 07:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MarcinusX/c3794b4d750690860613fead652be453 to your computer and use it in GitHub Desktop.
Save MarcinusX/c3794b4d750690860613fead652be453 to your computer and use it in GitHub Desktop.
class Line extends AnimatedWidget {
final Function(Note) onTileTap; //<--new parameter
...
@override
Widget build(BuildContext context) {
...
List<Widget> tiles = thisLineNotes.map((note) {
...
child: Tile(
height: tileHeight,
state: note.state,
onTap: () => onTileTap(note), //<-- pass tap callback
)
...
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment