refactor: dynamicize agent profile section labels using provider-based slug mapping

This commit is contained in:
pradeepkumar
2026-04-15 16:50:35 +05:30
parent 4bab9c06a7
commit 39231d5ca4
3 changed files with 46 additions and 28 deletions

View File

@@ -834,16 +834,16 @@ class _AgentHomeContentState extends ConsumerState<_AgentHomeContent> {
color: AppColors.primaryDark)),
const SizedBox(height: 16),
_buildExperienceRow(
'Years in Experience', state.yearsInExperience),
state.yearsInExperienceLabel, state.yearsInExperience),
const Divider(height: 24, thickness: 0.2),
_buildExperienceRow(
'Number of contract closed', state.contractsClosed),
state.contractsClosedLabel, state.contractsClosed),
const Divider(height: 24, thickness: 0.2),
if (state.licensingAreas.isNotEmpty) ...[
const Align(
Align(
alignment: Alignment.centerLeft,
child: Text('Licensing & Areas',
style: TextStyle(
child: Text(state.licensingAreasLabel,
style: const TextStyle(
fontFamily: 'Fractul',
fontSize: 14,
fontWeight: FontWeight.w700,
@@ -854,10 +854,10 @@ class _AgentHomeContentState extends ConsumerState<_AgentHomeContent> {
const SizedBox(height: 16),
],
if (state.expertiseYears.isNotEmpty) ...[
const Align(
Align(
alignment: Alignment.centerLeft,
child: Text('Areas in expertise & Years',
style: TextStyle(
child: Text(state.expertiseYearsLabel,
style: const TextStyle(
fontFamily: 'Fractul',
fontSize: 14,
fontWeight: FontWeight.w700,
@@ -872,10 +872,10 @@ class _AgentHomeContentState extends ConsumerState<_AgentHomeContent> {
],
if (state.certifications.isNotEmpty) ...[
const SizedBox(height: 16),
const Align(
Align(
alignment: Alignment.centerLeft,
child: Text('Certifications',
style: TextStyle(
child: Text(state.certificationsLabel,
style: const TextStyle(
fontFamily: 'Fractul',
fontSize: 14,
fontWeight: FontWeight.w700,