fix: hide billing plan container when name is empty or null
This commit is contained in:
@@ -144,6 +144,7 @@ class _BillingTabState extends ConsumerState<BillingTab>
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
if ((plan?['name'] as String?)?.trim().isNotEmpty == true) ...[
|
||||
Container(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 10),
|
||||
decoration: BoxDecoration(
|
||||
@@ -151,7 +152,7 @@ class _BillingTabState extends ConsumerState<BillingTab>
|
||||
borderRadius: BorderRadius.circular(15),
|
||||
),
|
||||
child: Text(
|
||||
plan?['name'] as String? ?? 'Annual Subscription',
|
||||
plan!['name'] as String,
|
||||
style: const TextStyle(
|
||||
fontFamily: 'SourceSerif4',
|
||||
fontSize: 14,
|
||||
@@ -160,6 +161,7 @@ class _BillingTabState extends ConsumerState<BillingTab>
|
||||
),
|
||||
),
|
||||
const SizedBox(height: 20),
|
||||
],
|
||||
Row(
|
||||
children: [
|
||||
const Icon(Icons.check_circle,
|
||||
|
||||
Reference in New Issue
Block a user