bug: can't share server via qr_code (#651)

Fixes #650
This commit is contained in:
lollipopkit🏳️‍⚧️
2024-12-02 22:22:14 +08:00
committed by GitHub
parent 4ace4af7da
commit 3a3c29764a
4 changed files with 15 additions and 9 deletions

View File

@@ -122,7 +122,10 @@ class _ServerDetailPageState extends State<ServerDetailPage>
CustomAppBar _buildAppBar(Server si) {
return CustomAppBar(
title: Text(si.spi.name),
title: Hero(
tag: 'home_card_title_${si.spi.id}',
child: Text(si.spi.name),
),
actions: [
QrShareBtn(
data: si.spi.toJsonString(),

View File

@@ -461,11 +461,14 @@ class _ServerPageState extends State<ServerPage>
children: [
ConstrainedBox(
constraints: BoxConstraints(maxWidth: _media.size.width / 2.3),
child: Text(
s.spi.name,
style: UIs.text13Bold,
maxLines: 1,
overflow: TextOverflow.ellipsis,
child: Hero(
tag: 'home_card_title_${s.spi.id}',
child: Text(
s.spi.name,
style: UIs.text13Bold,
maxLines: 1,
overflow: TextOverflow.ellipsis,
),
),
),
const Icon(