this repo has no description

feat: enhance profile tap functionality in TimelineItemWidget for better navigation

Improves profile tap navigation in timeline items

Enables direct navigation to user profiles when tapping names in timeline items, enhancing user experience and consistency. Updates layout in gallery page for better display of creator info.

+45 -33
+8 -10
lib/screens/gallery_page.dart
··· 273 ); 274 } 275 : null, 276 - child: Row( 277 - crossAxisAlignment: CrossAxisAlignment.center, 278 children: [ 279 Text( 280 gallery.creator?.displayName ?? '', ··· 282 fontWeight: FontWeight.w600, 283 ), 284 ), 285 - if ((gallery.creator?.displayName ?? '').isNotEmpty && 286 - (gallery.creator?.handle ?? '').isNotEmpty) 287 - const SizedBox(width: 8), 288 - Text( 289 - '@${gallery.creator?.handle ?? ''}', 290 - style: theme.textTheme.bodyMedium?.copyWith( 291 - color: theme.hintColor, 292 ), 293 - ), 294 ], 295 ), 296 ),
··· 273 ); 274 } 275 : null, 276 + child: Column( 277 + crossAxisAlignment: CrossAxisAlignment.start, 278 children: [ 279 Text( 280 gallery.creator?.displayName ?? '', ··· 282 fontWeight: FontWeight.w600, 283 ), 284 ), 285 + if ((gallery.creator?.handle ?? '').isNotEmpty) 286 + Text( 287 + '@${gallery.creator?.handle ?? ''}', 288 + style: theme.textTheme.bodyMedium?.copyWith( 289 + color: theme.hintColor, 290 + ), 291 ), 292 ], 293 ), 294 ),
+37 -23
lib/widgets/timeline_item.dart
··· 74 mainAxisAlignment: MainAxisAlignment.spaceBetween, 75 children: [ 76 Flexible( 77 - child: Text.rich( 78 - TextSpan( 79 - children: [ 80 - if (actor?.displayName?.isNotEmpty ?? false) 81 - TextSpan( 82 - text: actor!.displayName ?? '', 83 - style: theme.textTheme.titleMedium?.copyWith( 84 - fontWeight: FontWeight.w600, 85 - fontSize: 16, 86 ), 87 - ), 88 - if (actor != null && actor.handle.isNotEmpty) 89 - TextSpan( 90 - text: (actor.displayName?.isNotEmpty ?? false) 91 - ? ' @${actor.handle}' 92 - : '@${actor.handle}', 93 - style: theme.textTheme.bodySmall?.copyWith( 94 - fontSize: 14, 95 - color: theme.colorScheme.onSurfaceVariant, 96 - fontWeight: FontWeight.normal, 97 ), 98 - ), 99 - ], 100 ), 101 - overflow: TextOverflow.ellipsis, 102 - maxLines: 1, 103 ), 104 ), 105 Text(
··· 74 mainAxisAlignment: MainAxisAlignment.spaceBetween, 75 children: [ 76 Flexible( 77 + child: GestureDetector( 78 + onTap: 79 + onProfileTap ?? 80 + () { 81 + if (actor?.did != null) { 82 + Navigator.of(context).push( 83 + MaterialPageRoute( 84 + builder: (context) => 85 + ProfilePage(did: actor!.did, showAppBar: true), 86 + ), 87 + ); 88 + } 89 + }, 90 + child: Text.rich( 91 + TextSpan( 92 + children: [ 93 + if (actor?.displayName?.isNotEmpty ?? false) 94 + TextSpan( 95 + text: actor!.displayName ?? '', 96 + style: theme.textTheme.titleMedium?.copyWith( 97 + fontWeight: FontWeight.w600, 98 + fontSize: 16, 99 + ), 100 ), 101 + if (actor != null && actor.handle.isNotEmpty) 102 + TextSpan( 103 + text: (actor.displayName?.isNotEmpty ?? false) 104 + ? ' @${actor.handle}' 105 + : '@${actor.handle}', 106 + style: theme.textTheme.bodySmall?.copyWith( 107 + fontSize: 14, 108 + color: theme.colorScheme.onSurfaceVariant, 109 + fontWeight: FontWeight.normal, 110 + ), 111 ), 112 + ], 113 + ), 114 + overflow: TextOverflow.ellipsis, 115 + maxLines: 1, 116 ), 117 ), 118 ), 119 Text(