How to pass the item in the onPressed #312
Unanswered
athompson887
asked this question in
Q&A
Replies: 1 comment
-
Assuming you have list of row items and you want to print the index of each row then you could do the below, Just delete the function doNothing and assign the void to onPressed |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In the example code the function doNothing is called and this works fine but I cannot see how I can access the value of the row item that was swiped/pressed or even its index as the function takes no parameters. I have looked at the build context to see if its there but I cannot find it.
This is probably very easy but I am not seeing it.
Can someone help?
Beta Was this translation helpful? Give feedback.
All reactions