flutter-intro-slider
flutter-intro-slider copied to clipboard
Enhance onPressed callbacks to support better analytics
I'd like to add some analytics to the intro slider, and want to suggest a couple of changes. Happy to send a PR if you think these are good ideas:
- onNextPress callback should be a function that takes a parameter (int) that gives the index of the slide the user is swiping to.
- Add a new callback, onPrevPress, to make it consistent with the other buttons, taking a parameter (int) as above.
- Add a callback, onSlide, that takes a parameter (int), and which the caller can listen to for whenever the user enters a different slide.
This will be helpful to collect analytics about which slides users are visiting, and/or performing A/B tests to figure out the performance of different slide designs.
Hi, thanks for your raised issue.
I think 1 & 2 are fine, but at 3 we already have onTabChangeCompleted
, is it got what you need?