Make plan toggle UX similar to web.

This commit is contained in:
Neeraj Gupta 2021-08-19 22:50:47 +05:30
parent eb30433c1d
commit 9535f612b2

View file

@ -640,7 +640,14 @@ class _SubscriptionPageState extends State<SubscriptionPage> {
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<SubscriptionPage> {
setState(() {});
},
),
Text(
"yearly plans",
style: TextStyle(
color: Theme.of(context)
.buttonColor
.withOpacity(_showYearlyPlan ? 1.0 : 0.2),
),
),
],
),
);