flutter_showcaseview icon indicating copy to clipboard operation
flutter_showcaseview copied to clipboard

I request a skip button to stop showcasing the widgets.

Open giritlgc opened this issue 4 years ago • 13 comments

I am very happy using this package. I have one request for a feature. I want an option to skip the process of showcasing the widgets.

For example, If I have five widgets to show, the process starts showing each widget in a sequence. Right now, I need to look at all widgets to complete the process. I want to stop the process after looking first two widgets.

Please add a feature that enables user to skip or stop the process in the middle of squence.

giritlgc avatar Apr 16 '21 08:04 giritlgc

This would be useful

mike-gallego avatar Apr 20 '21 18:04 mike-gallego

You can make it self UI for Skip, with run method

ShowCaseWidget.of(context).dismiss();

GarryLaly avatar May 02 '21 05:05 GarryLaly

ShowCaseWidget.of(context).dismiss();

@GarryLaly Could you describe how to do this? Is there a way to show a button or dialog, while the showcase is running?

AMuellerAtAHS avatar Oct 26 '21 06:10 AMuellerAtAHS

Ok I find a solution for that. If anybody is interested. You can use Showcase.withWidget() constructor.

Showcase.withWidget(
   key: YOURWIDGETKEY,
   width: double.infinity, // need fix width, you can use the whole width like this
   height: MediaQuery.of(context).size.height / 2, // for displaying showcase upper or lower to the widget
   container: Container(
      width: MediaQuery.of(context).size.width - 24
      child: Column(
         children: [
            Text("Title", style: Theme.of(context).textTheme.headline6),
            Text("Description"),
            Divider(),
            TextButton(
               style: TextButton.styleFrom(primary: Colors.grey),
               child: Text("skip"),
               onPressed: ShowCaseWidget.of(context).dismiss, // dismisses the current showcase procedure
            ),
         ],
      ),
   ),
)

AMuellerAtAHS avatar Nov 10 '21 14:11 AMuellerAtAHS

@AMuellerAtAHS, how did you show the skip button throughout the app tour?

SalishKumar avatar Nov 23 '21 16:11 SalishKumar

@SalishKumar

@AMuellerAtAHS, how did you show the skip button throughout the app tour?

I don't understand this question. Can you please explain it?

Anneress avatar Nov 24 '21 06:11 Anneress

@SalishKumar

@AMuellerAtAHS, how did you show the skip button throughout the app tour?

I don't understand this question. Can you please explain it?

With the method of @AMuellerAtAHS the dismiss button/option will only be shown for the Showcase you are including it in. It would make more sense to have one button somewhere on the screen that skips the showcase.

I couldn't find a way to overlay the showcase with a button to do this. When I use a stack, the button seems to get blurred and stay "behind" the showcasewidget.

MehmetMcfly avatar Mar 03 '22 09:03 MehmetMcfly

any update for the skip button?

vitulgoyani avatar May 26 '22 12:05 vitulgoyani

any update for the skip button?

If you use Showcase.withWidget() you can pass in any widget to be the "dialog" that pops up. Inside there you can use a button with an onPressed set to ShowCaseWidget.of(context)!.dismiss() to skip, unless you are looking to just skip the current step then the logic gets a little fuzzy.

amatier2 avatar Jun 16 '22 16:06 amatier2

There is a pull request waiting to get reviewed and merged: #156

AMuellerAtAHS avatar Jun 17 '22 05:06 AMuellerAtAHS

Please add the global skip button

sharpsaravanan avatar May 30 '23 06:05 sharpsaravanan

Please add the global skip button

qpalzm963 avatar Aug 02 '23 07:08 qpalzm963

I need a similar global skip button (to skip all sequences) and NEXT button (to go next sequence) button in Showcaseview

@MehmetMcfly @sharpsaravanan @qpalzm963 Did you find any alternate solution for this?

pawarn avatar Sep 21 '23 12:09 pawarn

One can certainly use Showcase.withWidget to create a custom skip button along with ShowCaseWidget.of(context).dismiss() function. If it is desired that such a button stays at a constant place and not attached to any particular Showcase then an issue (#395) with PR (#396) is already open and thus I am closing this one. Thanks for participating.

aditya-css avatar Mar 07 '24 18:03 aditya-css