-
-
Notifications
You must be signed in to change notification settings - Fork 607
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
onPressed problems #264
Comments
I assumed a function should be called in onPressed but that is not the case. My misunderstanding. Maybe the readme could be more informative. |
I had a similar problem trying to simply print. Trying to do so without a endActionPane: ActionPane(
children: [
SlidableAction(
onPressed: () => print('hey'),
label: 'Test',
),
],
motion: ScrollMotion(),
), To fix the error, you can pass endActionPane: ActionPane(
children: [
SlidableAction(
onPressed: (_) => print('hey'),
label: 'Test',
),
],
motion: ScrollMotion(),
), |
still get error |
In version 1.1.0 the onPressed function seems to be running on build but not when pressed. In a ListView.builder with a simple function, which prints index of list when run, the index is printed for the entire list on build but not when the slidable is pressed.
The text was updated successfully, but these errors were encountered: