duytq94 / flutter-intro-slider

Simple and configurable app introduction slider for Flutter
https://pub.dartlang.org/packages/intro_slider
MIT License
677 stars 141 forks source link

Add `renderCustomBottom` for `IntroSlider` #115

Closed kyya closed 3 years ago

kyya commented 3 years ago

I would like to customize the splash screen's bottom layout so that it can have a vertical layout.

For example:

Column(children: [
  DotIndicators(),
  DoneButton(),
])
duytq94 commented 3 years ago

Hi, thanks for your explanation, it's cool, but we should add an option so user can keep the previous/done button

kyya commented 3 years ago

Hi, thanks for your explanation, it's cool, but we should add an option so user can keep the previous/done button

We can extend BottomLayoutBuilder to let it have more params, but it seems not so elegant. I am finding a way to improve it.

duytq94 commented 3 years ago

And I see renderCustomBottom with given dots as a parameter may be hard to understand to use. Not sure, but I think can we can give an option to make the dots (and maybe also left/right button) show or hide, then add an optional bottomWidget, it's just a widget below the dots.

kyya commented 3 years ago

And I see renderCustomBottom with given dots as a parameter may be hard to understand to use. Not sure, but I think can we can give an option to make the dots (and maybe also left/right button) show or hide, then add an optional bottomWidget, it's just a widget below the dots.

It's a dependency injection like BuildContext, I believe that it's not so hard to understand with some useful examples. And the key point is a custom layout. With the elements like dots, done button, skip button and prev button you provided, the developer can define their own bottom layout.

Currently, developers cannot decide how to combine these elements by themselves at the bottom. Assuming that I would like the done button at the bottom left and the skip button at the bottom right, what should I do?