feat: Add a back button to the agent search screen and adjust the search bar's left padding.
This commit is contained in:
@@ -102,8 +102,38 @@ class _AgentDetailScreenState extends ConsumerState<AgentDetailScreen> {
|
|||||||
physics: const AlwaysScrollableScrollPhysics(),
|
physics: const AlwaysScrollableScrollPhysics(),
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
|
// ── Back Button ──
|
||||||
|
Padding(
|
||||||
|
padding: const EdgeInsets.fromLTRB(16, 8, 16, 0),
|
||||||
|
child: Align(
|
||||||
|
alignment: Alignment.centerLeft,
|
||||||
|
child: GestureDetector(
|
||||||
|
onTap: () {
|
||||||
|
if (Navigator.of(context).canPop()) {
|
||||||
|
Navigator.of(context).pop();
|
||||||
|
} else {
|
||||||
|
context.go('/home');
|
||||||
|
}
|
||||||
|
},
|
||||||
|
child: Container(
|
||||||
|
width: 36,
|
||||||
|
height: 36,
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: AppColors.primaryDark.withValues(alpha: 0.08),
|
||||||
|
shape: BoxShape.circle,
|
||||||
|
),
|
||||||
|
child: const Icon(
|
||||||
|
Icons.arrow_back_ios_new_rounded,
|
||||||
|
color: AppColors.primaryDark,
|
||||||
|
size: 18,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
// ── Avatar Section ──
|
// ── Avatar Section ──
|
||||||
const SizedBox(height: 16),
|
const SizedBox(height: 8),
|
||||||
_buildAvatarSection(agent),
|
_buildAvatarSection(agent),
|
||||||
|
|
||||||
// ── Status + Connect Buttons ──
|
// ── Status + Connect Buttons ──
|
||||||
|
|||||||
@@ -116,11 +116,22 @@ class _AgentSearchScreenState extends ConsumerState<AgentSearchScreen> {
|
|||||||
|
|
||||||
Widget _buildSearchBar() {
|
Widget _buildSearchBar() {
|
||||||
return Padding(
|
return Padding(
|
||||||
padding: const EdgeInsets.fromLTRB(24, 16, 24, 0),
|
padding: const EdgeInsets.fromLTRB(16, 16, 24, 0),
|
||||||
child: SizedBox(
|
child: SizedBox(
|
||||||
height: 42,
|
height: 42,
|
||||||
child: Row(
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
|
GestureDetector(
|
||||||
|
onTap: () => context.go('/home'),
|
||||||
|
child: const Padding(
|
||||||
|
padding: EdgeInsets.only(right: 8),
|
||||||
|
child: Icon(
|
||||||
|
Icons.arrow_back_ios_new_rounded,
|
||||||
|
color: AppColors.primaryDark,
|
||||||
|
size: 20,
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Container(
|
child: Container(
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
|
|||||||
Reference in New Issue
Block a user