refactor: improve specialization card layout and unify chat screen header and navigation with home screen components.
This commit is contained in:
@@ -1067,6 +1067,7 @@ class _AgentDetailScreenState extends ConsumerState<AgentDetailScreen> {
|
||||
context.push('/login');
|
||||
return;
|
||||
}
|
||||
context.go('/messages');
|
||||
},
|
||||
),
|
||||
_buildNavItem(
|
||||
@@ -1078,6 +1079,7 @@ class _AgentDetailScreenState extends ConsumerState<AgentDetailScreen> {
|
||||
context.push('/login');
|
||||
return;
|
||||
}
|
||||
context.push('/profile');
|
||||
},
|
||||
),
|
||||
],
|
||||
@@ -1162,46 +1164,50 @@ class _ExpandableChipsSectionState extends State<_ExpandableChipsSection> {
|
||||
spacing: 10,
|
||||
runSpacing: 10,
|
||||
children: [
|
||||
...showItems.map((item) => Container(
|
||||
height: 28,
|
||||
padding: const EdgeInsets.symmetric(horizontal: 8),
|
||||
alignment: Alignment.center,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(15),
|
||||
border: Border.all(
|
||||
...showItems.map((item) => IntrinsicWidth(
|
||||
child: Container(
|
||||
height: 28,
|
||||
padding: const EdgeInsets.symmetric(horizontal: 10),
|
||||
alignment: Alignment.center,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(15),
|
||||
border: Border.all(
|
||||
color: AppColors.primaryDark,
|
||||
width: 0.7),
|
||||
),
|
||||
child: Text(
|
||||
item,
|
||||
style: const TextStyle(
|
||||
fontFamily: 'SourceSerif4',
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: AppColors.primaryDark,
|
||||
width: 0.7),
|
||||
),
|
||||
child: Text(
|
||||
item,
|
||||
style: const TextStyle(
|
||||
fontFamily: 'SourceSerif4',
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.w500,
|
||||
color: AppColors.primaryDark,
|
||||
),
|
||||
),
|
||||
),
|
||||
)),
|
||||
if (hasMore && !_expanded)
|
||||
GestureDetector(
|
||||
onTap: () => setState(() => _expanded = true),
|
||||
child: Container(
|
||||
height: 28,
|
||||
padding: const EdgeInsets.symmetric(horizontal: 8),
|
||||
alignment: Alignment.center,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(15),
|
||||
border: Border.all(
|
||||
color: AppColors.primaryDark.withValues(alpha: 0.15),
|
||||
width: 1),
|
||||
),
|
||||
child: Text(
|
||||
'+${widget.items.length - widget.initialCount} More',
|
||||
style: const TextStyle(
|
||||
fontFamily: 'SourceSerif4',
|
||||
fontSize: 15,
|
||||
fontWeight: FontWeight.w300,
|
||||
color: AppColors.primaryDark,
|
||||
child: IntrinsicWidth(
|
||||
child: Container(
|
||||
height: 28,
|
||||
padding: const EdgeInsets.symmetric(horizontal: 10),
|
||||
alignment: Alignment.center,
|
||||
decoration: BoxDecoration(
|
||||
borderRadius: BorderRadius.circular(15),
|
||||
border: Border.all(
|
||||
color: AppColors.primaryDark.withValues(alpha: 0.15),
|
||||
width: 1),
|
||||
),
|
||||
child: Text(
|
||||
'+${widget.items.length - widget.initialCount} More',
|
||||
style: const TextStyle(
|
||||
fontFamily: 'SourceSerif4',
|
||||
fontSize: 15,
|
||||
fontWeight: FontWeight.w300,
|
||||
color: AppColors.primaryDark,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -1230,7 +1236,7 @@ class _SpecializationCardWidget extends StatefulWidget {
|
||||
|
||||
class _SpecializationCardWidgetState extends State<_SpecializationCardWidget> {
|
||||
bool _expanded = false;
|
||||
static const _initialCount = 5;
|
||||
static const _initialCount = 3;
|
||||
|
||||
IconData get _icon {
|
||||
final slug = widget.card.slug.toLowerCase();
|
||||
|
||||
@@ -414,6 +414,7 @@ class _AgentSearchScreenState extends ConsumerState<AgentSearchScreen> {
|
||||
context.push('/login');
|
||||
return;
|
||||
}
|
||||
context.push('/profile');
|
||||
},
|
||||
),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user