diff --git a/lib/features/profile/presentation/pages/profile_screen.dart b/lib/features/profile/presentation/pages/profile_screen.dart index 191a94ae..6bac8c74 100644 --- a/lib/features/profile/presentation/pages/profile_screen.dart +++ b/lib/features/profile/presentation/pages/profile_screen.dart @@ -690,24 +690,47 @@ class _ProfileScreenState extends State { for (int i = 0; i < state.profile.badges.length; i++) ...[ state.profile.badges[i].image.contains('svg') ? Tooltip( - message: state.profile.badges[i].description, + preferBelow: true, + showDuration: const Duration(seconds: 5), + richMessage: WidgetSpan( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text(state.profile.badges[i].title, style: TextStyles.textMSemibold.copyWith(color: appTheme.black)), + const SizedBox(height: 4), + Text(state.profile.badges[i].description, style: TextStyles.textSMedium.copyWith(color: appTheme.gray600)), + ], + ), + ), triggerMode: TooltipTriggerMode.tap, + padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 12), textStyle: const TextStyle(color: Colors.black, fontSize: 16, fontWeight: FontWeight.w500), decoration: BoxDecoration( color: Colors.white, - borderRadius: BorderRadius.circular(4), + borderRadius: BorderRadius.circular(12), boxShadow: [BoxShadow(color: Colors.black.withAlpha((255 * 0.2).toInt()), blurRadius: 32)], ), child: SvgPicture.network('${sl().baseUrl}/storage/${state.profile.badges[i].image}', width: 40, height: 40), ) : Tooltip( - message: state.profile.badges[i].description, - margin: const EdgeInsets.symmetric(horizontal: 32), + preferBelow: true, + showDuration: const Duration(seconds: 5), + richMessage: WidgetSpan( + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text(state.profile.badges[i].title, style: TextStyles.textMSemibold.copyWith(color: appTheme.black)), + const SizedBox(height: 4), + Text(state.profile.badges[i].description, style: TextStyles.textSMedium.copyWith(color: appTheme.gray600)), + ], + ), + ), triggerMode: TooltipTriggerMode.tap, + padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 12), textStyle: const TextStyle(color: Colors.black, fontSize: 16, fontWeight: FontWeight.w500), decoration: BoxDecoration( color: Colors.white, - borderRadius: BorderRadius.circular(4), + borderRadius: BorderRadius.circular(12), boxShadow: [BoxShadow(color: Colors.black.withAlpha((255 * 0.2).toInt()), blurRadius: 32)], ), child: CachedNetworkImage(imageUrl: '${sl().baseUrl}/storage/${state.profile.badges[i].image}', width: 40, height: 40), @@ -846,7 +869,10 @@ class _ProfileScreenState extends State { icon: 'assets/icons/eye.svg', text: 'Посмотреть', onTap: () async { - context.pushTransparentRoute(rootNavigator: true, PhotoViewScreen(imageUrls: [sl().baseUrl + state.profile.profilePhotoUrl], index: 0)); + context.pushTransparentRoute( + rootNavigator: true, + PhotoViewScreen(imageUrls: [sl().baseUrl + state.profile.profilePhotoUrl], index: 0), + ); }, ), if (state.isMyProfile) ...[ @@ -1003,7 +1029,10 @@ class _ProfileScreenState extends State { onTap: () { final box = context.findRenderObject() as RenderBox?; SharePlus.instance.share( - ShareParams(uri: Uri.parse('${sl().baseUrl}/ru/profile/${state.profile.slug}'), sharePositionOrigin: box!.localToGlobal(Offset.zero) & box.size), + ShareParams( + uri: Uri.parse('${sl().baseUrl}/ru/profile/${state.profile.slug}'), + sharePositionOrigin: box!.localToGlobal(Offset.zero) & box.size, + ), ); }, ),