feat: update agent match calculation, enable tag expansion in search, increase socket reconnect attempts, and disable profile title editing
This commit is contained in:
@@ -400,14 +400,15 @@ class _AgentCard extends StatefulWidget {
|
|||||||
|
|
||||||
class _AgentCardState extends State<_AgentCard> {
|
class _AgentCardState extends State<_AgentCard> {
|
||||||
bool _bioExpanded = false;
|
bool _bioExpanded = false;
|
||||||
|
bool _tagsExpanded = false;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final agent = widget.agent;
|
final agent = widget.agent;
|
||||||
final specializations = agent.specializations;
|
final specializations = agent.specializations;
|
||||||
final bio = agent.description;
|
final bio = agent.description;
|
||||||
final matchPercent = agent.averageRating != null
|
final matchPercent = agent.matchPercentage != null
|
||||||
? '${(agent.averageRating! * 20).round()}%'
|
? '${agent.matchPercentage}%'
|
||||||
: null;
|
: null;
|
||||||
|
|
||||||
return Container(
|
return Container(
|
||||||
@@ -679,11 +680,15 @@ class _AgentCardState extends State<_AgentCard> {
|
|||||||
spacing: 6,
|
spacing: 6,
|
||||||
runSpacing: 6,
|
runSpacing: 6,
|
||||||
children: [
|
children: [
|
||||||
...specializations
|
...(_tagsExpanded
|
||||||
.take(6)
|
? specializations
|
||||||
|
: specializations.take(6))
|
||||||
.map((tag) => _buildTag(tag)),
|
.map((tag) => _buildTag(tag)),
|
||||||
if (specializations.length > 6)
|
if (specializations.length > 6)
|
||||||
Container(
|
GestureDetector(
|
||||||
|
onTap: () =>
|
||||||
|
setState(() => _tagsExpanded = !_tagsExpanded),
|
||||||
|
child: Container(
|
||||||
padding: const EdgeInsets.symmetric(
|
padding: const EdgeInsets.symmetric(
|
||||||
horizontal: 10, vertical: 5),
|
horizontal: 10, vertical: 5),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
@@ -694,7 +699,9 @@ class _AgentCardState extends State<_AgentCard> {
|
|||||||
color: AppColors.accentOrange, width: 0.7),
|
color: AppColors.accentOrange, width: 0.7),
|
||||||
),
|
),
|
||||||
child: Text(
|
child: Text(
|
||||||
'+${specializations.length - 6} more',
|
_tagsExpanded
|
||||||
|
? 'Show Less'
|
||||||
|
: '+${specializations.length - 6} more',
|
||||||
style: const TextStyle(
|
style: const TextStyle(
|
||||||
fontFamily: 'SourceSerif4',
|
fontFamily: 'SourceSerif4',
|
||||||
fontSize: 13,
|
fontSize: 13,
|
||||||
@@ -703,6 +710,7 @@ class _AgentCardState extends State<_AgentCard> {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
const SizedBox(height: 14),
|
const SizedBox(height: 14),
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ class SocketService {
|
|||||||
bool _isConnected = false;
|
bool _isConnected = false;
|
||||||
bool _intentionalDisconnect = false;
|
bool _intentionalDisconnect = false;
|
||||||
int _reconnectAttempts = 0;
|
int _reconnectAttempts = 0;
|
||||||
static const _maxReconnectAttempts = 3;
|
static const _maxReconnectAttempts = 5;
|
||||||
String? _currentToken;
|
String? _currentToken;
|
||||||
|
|
||||||
// Stream controllers for events
|
// Stream controllers for events
|
||||||
|
|||||||
@@ -266,7 +266,7 @@ class _ProfileSettingsTabState extends ConsumerState<ProfileSettingsTab> {
|
|||||||
ProfileFormField(
|
ProfileFormField(
|
||||||
label: isAgent ? 'Career / Agent Type' : 'Professional Title',
|
label: isAgent ? 'Career / Agent Type' : 'Professional Title',
|
||||||
controller: _titleController,
|
controller: _titleController,
|
||||||
enabled: !isAgent,
|
enabled: false,
|
||||||
),
|
),
|
||||||
const SizedBox(height: 24),
|
const SizedBox(height: 24),
|
||||||
ProfileFormField(
|
ProfileFormField(
|
||||||
|
|||||||
Reference in New Issue
Block a user