From 436f8fac427802fec5a145ef3a6175f6977abf42 Mon Sep 17 00:00:00 2001 From: pradeepkumar Date: Thu, 16 Apr 2026 16:31:45 +0530 Subject: [PATCH] fix: hide billing plan container when name is empty or null --- .../presentation/widgets/billing_tab.dart | 30 ++++++++++--------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/lib/features/profile/presentation/widgets/billing_tab.dart b/lib/features/profile/presentation/widgets/billing_tab.dart index 1c281e7..a336eef 100644 --- a/lib/features/profile/presentation/widgets/billing_tab.dart +++ b/lib/features/profile/presentation/widgets/billing_tab.dart @@ -144,22 +144,24 @@ class _BillingTabState extends ConsumerState child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ - Container( - padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 10), - decoration: BoxDecoration( - color: AppColors.accentOrange, - borderRadius: BorderRadius.circular(15), - ), - child: Text( - plan?['name'] as String? ?? 'Annual Subscription', - style: const TextStyle( - fontFamily: 'SourceSerif4', - fontSize: 14, - color: Colors.white, + if ((plan?['name'] as String?)?.trim().isNotEmpty == true) ...[ + Container( + padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 10), + decoration: BoxDecoration( + color: AppColors.accentOrange, + borderRadius: BorderRadius.circular(15), + ), + child: Text( + plan!['name'] as String, + style: const TextStyle( + fontFamily: 'SourceSerif4', + fontSize: 14, + color: Colors.white, + ), ), ), - ), - const SizedBox(height: 20), + const SizedBox(height: 20), + ], Row( children: [ const Icon(Icons.check_circle,