SimformSolutionsPvtLtd / flutter_showcaseview

Flutter plugin that allows you to showcase your features on flutter application. šŸ‘ŒšŸ”šŸŽ‰
https://pub.dev/packages/showcaseview
MIT License
1.48k stars 433 forks source link

Clicking on Tooltip Text Ends Showcase Unexpectedly #431

Closed himanshu-newstok closed 4 months ago

himanshu-newstok commented 4 months ago

Describe the bug When using Showcase.withWidget containing text and a button, with the properties disableDefaultTargetGestures: true and disableBarrierInteraction: true, clicking on the tooltip text ends the showcase. This behavior is unexpected as I have disabled default target gestures and barrier interaction. The same goes for normal ShowCase widget, if you click the tooltip the show case ends.

To Reproduce Steps to reproduce the behavior:

  1. Create a ShowCaseWidget.
  2. Create a ShowCase.
  3. Set disableMovingAnimation: true , disableBarrierInteraction: true and start the showcase.
  4. Now click tooltip, it ends the show case. I want to disable this behavior. I tried using ShowCase.withWidget for that but the behaviour persist.

Expected behavior Clicking on the tooltip text should not end the showcase, as I have disabled default target gestures and barrier interaction.

Screenshots

https://github.com/SimformSolutionsPvtLtd/flutter_showcaseview/assets/165873189/55924039-a9de-4555-be3f-9b413258c7d6

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context In normal Showcase widgets, there is an onToolTipClick function which allows handling of tooltip clicks. However, in this case, since it's a custom widget, I need to disable the clicking behavior altogether.

himanshu-newstok commented 4 months ago

ok i solved it. In ShowCase it is necessary to use disposeOnTap when using onTargetClick. So whenever we click tooltip here it ends or dispose the current showcase, and which can be controlled by onToolTipClick in ShowCase.

In Showcase.withWidget it is not necessary to have disposeOnTap when using onTargetClick. If we just set disposeOnTap as false (which is already by default false) then on click of tooltip it will not dispose.

But still in normal use case when using Showcase. If we want to make tooltip disable or not clickable and still use onTargetClick. It is not possible.

aditya-css commented 4 months ago

If you want to use onTargetClick and not end or dispose showcase then simply have value of disposeOnTap as false and don't make disableDefaultTargetGestures as true. Let me know if you have any other queries.