flutter-intro-slider icon indicating copy to clipboard operation
flutter-intro-slider copied to clipboard

Enhance onPressed callbacks to support better analytics

Open sishyanet opened this issue 2 years ago • 1 comments

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:

  1. onNextPress callback should be a function that takes a parameter (int) that gives the index of the slide the user is swiping to.
  2. Add a new callback, onPrevPress, to make it consistent with the other buttons, taking a parameter (int) as above.
  3. 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.

sishyanet avatar Jan 14 '23 23:01 sishyanet

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?

duytq94 avatar Jan 18 '23 03:01 duytq94