From 14e3d8af2fba2175af2c38c5499b2247a69387cc Mon Sep 17 00:00:00 2001 From: Noo6 <2746419228@qq.com> Date: Thu, 4 Jul 2024 01:03:03 +0800 Subject: [PATCH] fix: ssh card tap area --- lib/view/page/ssh/tab.dart | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/lib/view/page/ssh/tab.dart b/lib/view/page/ssh/tab.dart index b5cc0bf0e..21a6cb330 100644 --- a/lib/view/page/ssh/tab.dart +++ b/lib/view/page/ssh/tab.dart @@ -108,16 +108,27 @@ class _SSHTabPageState extends State } return GridView.builder( padding: const EdgeInsets.all(7), - itemBuilder: (_, idx) { + itemBuilder: (context, idx) { final spi = Pros.server.pick(id: pro.serverOrder[idx])?.spi; if (spi == null) return UIs.placeholder; return CardX( - child: ListTile( - contentPadding: const EdgeInsets.only(left: 17, right: 7), - title: Text(spi.name), - trailing: const Icon(Icons.chevron_right), + child: InkWell( onTap: () => _onTapInitCard(spi), - ).center(), + child: Container( + alignment: Alignment.centerLeft, + padding: const EdgeInsets.only(left: 17, right: 7), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + Text( + spi.name, + style: Theme.of(context).textTheme.bodyLarge, + ), + const Icon(Icons.chevron_right) + ], + ), + ), + ), ); }, itemCount: pro.servers.length,