show free text against free plan

This commit is contained in:
Neeraj Gupta 2021-08-21 18:05:37 +05:30
parent daa61af183
commit 4b039089c3

View file

@ -16,6 +16,11 @@ class SubscriptionPlanWidget extends StatelessWidget {
final String period; final String period;
final bool isActive; final bool isActive;
String _displayPrice() {
var result = price + (period.isNotEmpty ? " per " + period : "");
return result.isNotEmpty ? result : "free";
}
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Container( return Container(
@ -49,7 +54,7 @@ class SubscriptionPlanWidget extends StatelessWidget {
), ),
), ),
), ),
Text(price + (period.isNotEmpty ? " per " + period : "")), Text(_displayPrice()),
Expanded(child: Container()), Expanded(child: Container()),
isActive isActive
? Expanded( ? Expanded(