Closed Fintasys closed 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
@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 🙇
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:
TextButton
, you hard to handle onPress action (eg: how to check slide is animating to prevent jump to next tab like photo below?)
@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.
OK, I'll close this issue since the latest improvement has given users to custom almost cases, thanks.
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 onlynameNextBtn
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!