fix: hide billing plan container when name is empty or null

This commit is contained in:
pradeepkumar
2026-04-16 16:31:45 +05:30
parent c738b49497
commit 436f8fac42

View File

@@ -144,22 +144,24 @@ class _BillingTabState extends ConsumerState<BillingTab>
child: Column( child: Column(
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Container( if ((plan?['name'] as String?)?.trim().isNotEmpty == true) ...[
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 10), Container(
decoration: BoxDecoration( padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 10),
color: AppColors.accentOrange, decoration: BoxDecoration(
borderRadius: BorderRadius.circular(15), color: AppColors.accentOrange,
), borderRadius: BorderRadius.circular(15),
child: Text( ),
plan?['name'] as String? ?? 'Annual Subscription', child: Text(
style: const TextStyle( plan!['name'] as String,
fontFamily: 'SourceSerif4', style: const TextStyle(
fontSize: 14, fontFamily: 'SourceSerif4',
color: Colors.white, fontSize: 14,
color: Colors.white,
),
), ),
), ),
), const SizedBox(height: 20),
const SizedBox(height: 20), ],
Row( Row(
children: [ children: [
const Icon(Icons.check_circle, const Icon(Icons.check_circle,