From 9535f612b217932bb2b1f62cc64c85d6168d53f0 Mon Sep 17 00:00:00 2001 From: Neeraj Gupta Date: Thu, 19 Aug 2021 22:50:47 +0530 Subject: [PATCH] Make plan toggle UX similar to web. --- lib/ui/payment/subscription_page.dart | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/lib/ui/payment/subscription_page.dart b/lib/ui/payment/subscription_page.dart index 7a6b70d47..241aaca0a 100644 --- a/lib/ui/payment/subscription_page.dart +++ b/lib/ui/payment/subscription_page.dart @@ -640,7 +640,14 @@ class _SubscriptionPageState extends State { child: Row( mainAxisAlignment: MainAxisAlignment.spaceAround, children: [ - _showYearlyPlan ? Text("yearly plans") : Text("monthly plans"), + Text( + "monthly plans", + style: TextStyle( + color: Theme.of(context) + .buttonColor + .withOpacity(_showYearlyPlan ? 0.2 : 1.0), + ), + ), Switch( value: _showYearlyPlan, onChanged: (value) async { @@ -649,6 +656,14 @@ class _SubscriptionPageState extends State { setState(() {}); }, ), + Text( + "yearly plans", + style: TextStyle( + color: Theme.of(context) + .buttonColor + .withOpacity(_showYearlyPlan ? 1.0 : 0.2), + ), + ), ], ), );