From 7a72d326497875355a71c0b1c208899956432850 Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Sun, 16 Nov 2025 12:06:48 +0800 Subject: [PATCH] :bug: Fix publisher page account avatar no gesture detector, close #188 --- lib/screens/posts/publisher_profile.dart | 31 +++++++++++++++++++++--- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/lib/screens/posts/publisher_profile.dart b/lib/screens/posts/publisher_profile.dart index 651c0a26..956a070b 100644 --- a/lib/screens/posts/publisher_profile.dart +++ b/lib/screens/posts/publisher_profile.dart @@ -73,10 +73,33 @@ class _PublisherBasisWidget extends StatelessWidget { Positioned( bottom: -24, left: 16, - child: ProfilePictureWidget( - file: data.picture, - radius: 32, - borderRadius: data.type == 0 ? null : 12, + child: GestureDetector( + child: Badge( + isLabelVisible: data.type == 0, + padding: EdgeInsets.all(3), + label: Icon( + Symbols.launch, + size: 12, + color: Theme.of(context).colorScheme.onPrimary, + ), + backgroundColor: + Theme.of(context).colorScheme.primary, + offset: Offset(0, 48), + child: ProfilePictureWidget( + file: data.picture, + radius: 32, + borderRadius: data.type == 0 ? null : 12, + ), + ), + onTap: () { + if (data.account?.name != null) { + Navigator.pop(context, true); + context.pushNamed( + 'accountProfile', + pathParameters: {'name': data.account!.name}, + ); + } + }, ), ), ],