From 2bba5fcef2adc158b33eda84bd2bb2c830316e3c Mon Sep 17 00:00:00 2001 From: lollipopkit <10864310+lollipopkit@users.noreply.github.com> Date: Mon, 2 Dec 2024 21:55:41 +0800 Subject: [PATCH] bug: can't share server via qr_code Fixes #650 --- lib/view/page/server/detail/view.dart | 5 ++++- lib/view/page/server/tab.dart | 13 ++++++++----- pubspec.lock | 4 ++-- pubspec.yaml | 2 +- 4 files changed, 15 insertions(+), 9 deletions(-) diff --git a/lib/view/page/server/detail/view.dart b/lib/view/page/server/detail/view.dart index 4252febed..0e4a5240e 100644 --- a/lib/view/page/server/detail/view.dart +++ b/lib/view/page/server/detail/view.dart @@ -122,7 +122,10 @@ class _ServerDetailPageState extends State 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(), diff --git a/lib/view/page/server/tab.dart b/lib/view/page/server/tab.dart index 441718029..93dd3d364 100644 --- a/lib/view/page/server/tab.dart +++ b/lib/view/page/server/tab.dart @@ -461,11 +461,14 @@ class _ServerPageState extends State 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( diff --git a/pubspec.lock b/pubspec.lock index ad279f0c8..ee55e4d32 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -478,8 +478,8 @@ packages: dependency: "direct main" description: path: "." - ref: "v1.0.218" - resolved-ref: b8108c9ffe1e67da22e8f9003e0adfe2692f3b0b + ref: "v1.0.219" + resolved-ref: "1b52e9179ded8e0e90d9419a4e6d47c0ef4d1dd0" url: "https://github.com/lppcg/fl_lib" source: git version: "0.0.1" diff --git a/pubspec.yaml b/pubspec.yaml index f0364ac8f..1033071a4 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -60,7 +60,7 @@ dependencies: fl_lib: git: url: https://github.com/lppcg/fl_lib - ref: v1.0.218 + ref: v1.0.219 dependency_overrides: # dartssh2: