flutter-stripe / flutter_stripe

Flutter SDK for Stripe.
https://pub.dev/packages/flutter_stripe
930 stars 514 forks source link

Payment sheet visibility listener #1774

Open AntoniPochopien opened 4 months ago

AntoniPochopien commented 4 months ago

I would like to request a feature that enables the detection of when the payment sheet is visible on the screen. For instance, I intend to trigger background animations while the payment sheet is being displayed.

The proposed solution involves implementing a listener that can provide data regarding the status of the sheet. Alternatively, without a listener, we could assume the sheet is visible after initializing the payment sheet. However, accurately determining when the sheet disappears after a successful payment remains challenging.

It's worth noting that adding a listener might pose a risk, as it could potentially lead inexperienced developers to rely on it to confirm payments instead of utilizing webhooks.

remonh87 commented 3 months ago

for this we rely on the implementation of the Stripe sdk. The paymeent sheet is a native widget. I can try to log a ticket for Stripe to implement it