cortinico/slidetoact

Is there any way to make it work in an async way?

Sean-Y-X opened this issue · 1 comments

Thanks for this awesome library.

Just wondering if there is any way to make it async.

For example, aftering sliding to the right, call an api and waiting for the api response then show the complete animation.

Hi @Sean-Y-X

Unfortunately there is no support for this feature at the moment. I think it will be a good addition, though will add several states to the widget. Currently the widget is either "ready" or "completed".

What you're suggesting is to add the "loading" state (with some sort of animation that is missing at the moment), as well as some handling of error (like what should happen if the API call fails?).

I'm leaving this open if someone wants to propose an implementation. I'm happy to discuss it/review it.