tutorial_coach_mark icon indicating copy to clipboard operation
tutorial_coach_mark copied to clipboard

How to hide the skip button on last target?

Open Wesleychung93 opened this issue 3 years ago • 4 comments

I understood there is a hideSkip property when initializing the TutorialCoachMark, Appreciate could you guide how to hide skip button on last/final target ?

Wesleychung93 avatar Jan 12 '22 07:01 Wesleychung93

I don't know if is possible, i know that you can put skip button in all steps from tutorial.

chenrilima avatar Feb 14 '22 13:02 chenrilima

@chenrilima What's the point adding skip button on last step/target from tutorial ? IMO, the skip button should be hide automatically when reach to last step from tutorial

Wesleychung93 avatar Feb 15 '22 03:02 Wesleychung93

absolutely agreed

dragongesa avatar Sep 23 '22 04:09 dragongesa

@Wesleychung93 There is no way to conditionally show or hide the built-in skip button but there is a workaround for this. You will have to add the skip button as a TargetContent for each target and in the onTap property, you can call the skip() method on your TutorialCoachMark variable. Don't add the skip button on the last screen. It's can cause code redundancy, but this is the only way by which we can have the skip button removed from the last screen

pratik97179 avatar Oct 11 '22 15:10 pratik97179

@RafaelBarbosatec we can close this issue as it has already been resolved in version 1.2.6.

felipecastrosales avatar Feb 28 '23 12:02 felipecastrosales

IMHO this should be a breaking change and we should have the option to show "Skip" or Any other text/widget we want in the last (or only) target.

In our app it changed the behaviour of our 1-step tutorial and user now need to click the target only instead of the "ok" to skip.

I urge you to reconsider @RafaelBarbosatec or at least make it optional.

atrope avatar Feb 28 '23 14:02 atrope

Good point @atrope ! I will make it optional!

RafaelBarbosatec avatar Feb 28 '23 18:02 RafaelBarbosatec

@RafaelBarbosatec 1.2.7 is ok the only thing i would argue is that for this is to be a non-breaking change showSkipInLastTarget should be true by default.

atrope avatar Mar 13 '23 19:03 atrope