feat: Enhance agent profile data model with new fields and improved data derivation, and update agent search screen UI and icon.
This commit is contained in:
@@ -86,39 +86,49 @@ class _AgentSearchScreenState extends ConsumerState<AgentSearchScreen> {
|
||||
Expanded(
|
||||
child: Container(
|
||||
decoration: BoxDecoration(
|
||||
color: Colors.white,
|
||||
border: Border.all(
|
||||
color: AppColors.primaryDark,
|
||||
width: 0.1,
|
||||
),
|
||||
borderRadius: BorderRadius.circular(7),
|
||||
),
|
||||
child: TextField(
|
||||
controller: _searchController,
|
||||
style: const TextStyle(
|
||||
fontFamily: 'Fractul',
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: AppColors.primaryDark,
|
||||
child: Theme(
|
||||
data: Theme.of(context).copyWith(
|
||||
inputDecorationTheme: const InputDecorationTheme(
|
||||
filled: false,
|
||||
border: InputBorder.none,
|
||||
),
|
||||
),
|
||||
decoration: InputDecoration(
|
||||
hintText: 'Search Agents',
|
||||
hintStyle: TextStyle(
|
||||
child: TextField(
|
||||
controller: _searchController,
|
||||
style: const TextStyle(
|
||||
fontFamily: 'Fractul',
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: Colors.black.withValues(alpha: 0.5),
|
||||
color: AppColors.primaryDark,
|
||||
),
|
||||
border: InputBorder.none,
|
||||
enabledBorder: InputBorder.none,
|
||||
focusedBorder: InputBorder.none,
|
||||
contentPadding: const EdgeInsets.symmetric(
|
||||
horizontal: 14,
|
||||
vertical: 10,
|
||||
decoration: InputDecoration(
|
||||
hintText: 'Search Agents',
|
||||
hintStyle: TextStyle(
|
||||
fontFamily: 'Fractul',
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: Colors.black.withValues(alpha: 0.5),
|
||||
),
|
||||
filled: false,
|
||||
border: InputBorder.none,
|
||||
enabledBorder: InputBorder.none,
|
||||
focusedBorder: InputBorder.none,
|
||||
contentPadding: const EdgeInsets.symmetric(
|
||||
horizontal: 14,
|
||||
vertical: 10,
|
||||
),
|
||||
),
|
||||
onSubmitted: (value) {
|
||||
ref.read(searchAgentsProvider.notifier).search(value);
|
||||
},
|
||||
),
|
||||
onSubmitted: (value) {
|
||||
ref.read(searchAgentsProvider.notifier).search(value);
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -140,7 +150,13 @@ class _AgentSearchScreenState extends ConsumerState<AgentSearchScreen> {
|
||||
),
|
||||
borderRadius: BorderRadius.circular(7),
|
||||
),
|
||||
child: const Icon(Icons.search, color: Colors.white, size: 24),
|
||||
child: Center(
|
||||
child: SvgPicture.string(
|
||||
'<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z" fill="white"/></svg>',
|
||||
width: 24,
|
||||
height: 24,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
@@ -413,7 +429,7 @@ class _AgentCardState extends State<_AgentCard> {
|
||||
Widget build(BuildContext context) {
|
||||
final agent = widget.agent;
|
||||
final specializations = agent.specializations;
|
||||
final bio = agent.bio ?? '';
|
||||
final bio = agent.description;
|
||||
final matchPercent = agent.averageRating != null
|
||||
? '${(agent.averageRating! * 20).round()}%'
|
||||
: null;
|
||||
|
||||
Reference in New Issue
Block a user