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

renderDoneBtn and other should't be default TextButton #111

Closed Fintasys closed 3 years ago

Fintasys commented 3 years ago

Hey ! Thanks for your hard work on this awesome library !

I've noticed that all buttons, even if you define your own widget, are default TextButtons. I think that's rather confusing and should be only the case if only nameNextBtn is set. Building the widget just as given would give us the chance to adjust the button for next and others like I'm trying to do.

Let me know what do you think. Thank you!

duytq94 commented 3 years ago

Hi, You're right, I haven't think about it when I starting, rendering entire your custom button is more flexible than wrapping it by TextButton. I will update it later, if you could make a PR, I appreciate it

Fintasys commented 3 years ago

@duytq94 Thank you very much ! At the moment I can't find time for that, but I gonna keep it in mind and check again once I have more time 🙇

duytq94 commented 3 years ago

I just updated (still using TextButton) but with more flexibility and clearly at here https://github.com/duytq94/flutter-intro-slider/releases/tag/3.0.0 The reason I'm still using TextButton for wrapping because:

Fintasys commented 3 years ago

@duytq94 Thanks for looking into this issue and this improvement which is already very helpful !

To answer your question, something like this would be possible I guess

GestureDetector(
    onTap: () {
        // Logic 
    },
    child: AbsorbPointer(
        child: renderCustomWidget,
    )
)

any onTap in custom Widget would ignored and only gestureDetector's onTap would be called. But problem is that also any effect on the custom Widget, like ripple won't be triggered. But I guess your solution so far is not bad and might be the better option.

duytq94 commented 3 years ago

OK, I'll close this issue since the latest improvement has given users to custom almost cases, thanks.