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