diff --git a/lib/ui/payment/stripe_subscription_page.dart b/lib/ui/payment/stripe_subscription_page.dart index cf13f0aa6..4007192c8 100644 --- a/lib/ui/payment/stripe_subscription_page.dart +++ b/lib/ui/payment/stripe_subscription_page.dart @@ -13,6 +13,7 @@ import 'package:photos/ui/common/dialogs.dart'; import 'package:photos/ui/common/loading_widget.dart'; import 'package:photos/ui/common/progress_dialog.dart'; import 'package:photos/ui/common/web_page.dart'; +import 'package:photos/ui/components/button_widget.dart'; import 'package:photos/ui/payment/child_subscription_widget.dart'; import 'package:photos/ui/payment/payment_web_page.dart'; import 'package:photos/ui/payment/skip_subscription_widget.dart'; @@ -344,24 +345,23 @@ class _StripeSubscriptionPageState extends State { onPressed: () async { bool confirmAction = false; if (isRenewCancelled) { - final choice = await showChoiceDialog( + final choice = await showNewChoiceDialog( context, - title, - "Are you sure you want to renew?", - firstAction: "No", - secondAction: "Yes", + title: title, + body: "Are you sure you want to renew?", + firstButtonLabel: "Yes, Renew", ); - confirmAction = choice == DialogUserChoice.secondChoice; + confirmAction = choice == ButtonAction.first; } else { - final choice = await showChoiceDialog( + final choice = await showNewChoiceDialog( context, - title, - 'Are you sure you want to cancel?', - firstAction: 'Yes, cancel', - secondAction: 'No', - actionType: ActionType.critical, + title: title, + body: "Are you sure you want to cancel?", + firstButtonLabel: "Yes, cancel", + secondButtonLabel: "No", + isCritical: true, ); - confirmAction = choice == DialogUserChoice.firstChoice; + confirmAction = choice == ButtonAction.first; } if (confirmAction) { toggleStripeSubscription(isRenewCancelled); @@ -380,7 +380,7 @@ class _StripeSubscriptionPageState extends State { } catch (e) { showShortToast( context, - isRenewCancelled ? 'failed to renew' : 'failed to cancel', + isRenewCancelled ? 'Failed to renew' : 'Failed to cancel', ); } await _dialog.hide();