Skip to content

Commit

Permalink
fix: ssh card tap area (#448)
Browse files Browse the repository at this point in the history
  • Loading branch information
No06 authored Jul 4, 2024
1 parent 6e428c9 commit 5ce1310
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions lib/view/page/ssh/tab.dart
Original file line number Diff line number Diff line change
Expand Up @@ -108,16 +108,27 @@ class _SSHTabPageState extends State<SSHTabPage>
}
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,
Expand Down

0 comments on commit 5ce1310

Please sign in to comment.