showcase icon indicating copy to clipboard operation
showcase copied to clipboard

Showcase widget should return a future, or have a callback.

Open DeanPack opened this issue 5 years ago • 5 comments

This package would be much more useful if after the showcase is dismissed, that event can be easily captured.

DeanPack avatar Jan 24 '20 16:01 DeanPack

Hey @DeanPack!

What do you mean by "after the showcase is dismissed"? Could you provide a code idea or elaborate a little more, please?

comigor avatar Jan 24 '20 17:01 comigor

Hi @comigor

I'm @DeanPack 's coworker. We're using ShowCase to provide tutorials on our app and it's very helpful! From what we've seen, though, there's no way in code to tell when the ShowCaseWidget is done.

For example, if you wanted doSomething() to be called immediately after ShowCaseWidget.of(myContext).startShowCase([_key1, _key2, _key3]), there's no way to tell if ShowCaseWidget is finished with _key3 and doSomething() is called as soon as the ShowCaseWidget is run, even if there are ShowCases left to display.

We've tried running a function after our tutorial is finished but instead it appears to run simultaneously on the app since there is no trigger or flag to say that ShowCaseWidget is finished with all the keys.

If ShowCaseWidget wasn't void and returned something, we think that would be very helpful. I hope that makes sense.

SniktaVanManne avatar Jan 24 '20 18:01 SniktaVanManne

Ohh I get it! So you guys are using the showcaseWidgets API directly, and not the generator, is that right?

comigor avatar Jan 24 '20 18:01 comigor

I've opened up a PR with some changes, please review it and tell me if it makes sense: https://github.com/comigor/showcase/compare/futurize?expand=1#diff-98f497aa17758e8e42fe637feae4300e

Sorry about the other changes I've done, but I needed to bump and clean it up a little bit.

comigor avatar Jan 24 '20 18:01 comigor

I apologize @comigor, Dean contacted the wrong person.

We are using a package called showcaseview, not showcase. Sorry for the confusion. But thanks for your prompt replies!

SniktaVanManne avatar Jan 28 '20 16:01 SniktaVanManne