From c8767b4e1ea39bd17611d4f1e5cb7f62c86de1a3 Mon Sep 17 00:00:00 2001 From: "Dr.Blank" <64108942+Dr-Blank@users.noreply.github.com> Date: Wed, 23 Apr 2025 14:51:39 +0530 Subject: [PATCH] feat: enhance UserBar with user API details and improved text styling --- lib/features/you/view/you_page.dart | 31 +++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/lib/features/you/view/you_page.dart b/lib/features/you/view/you_page.dart index 53b33b8..ca789db 100644 --- a/lib/features/you/view/you_page.dart +++ b/lib/features/you/view/you_page.dart @@ -183,6 +183,10 @@ class UserBar extends HookConsumerWidget { @override Widget build(BuildContext context, WidgetRef ref) { final me = ref.watch(meProvider); + final api = ref.watch(authenticatedApiProvider); + + final themeData = Theme.of(context); + final textTheme = themeData.textTheme; return me.when( data: (userData) { @@ -194,19 +198,30 @@ class UserBar extends HookConsumerWidget { // first letter of the username child: Text( userData.username[0].toUpperCase(), - style: const TextStyle( - fontSize: 32, + style: textTheme.headlineLarge?.copyWith( fontWeight: FontWeight.bold, ), ), ), const SizedBox(width: 16), - Text( - userData.username, - style: const TextStyle( - fontSize: 24, - fontWeight: FontWeight.bold, - ), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + userData.username, + style: textTheme.headlineSmall?.copyWith( + fontWeight: FontWeight.bold, + ), + ), + const SizedBox(height: 4), + Text( + api.baseUrl.toString(), + style: textTheme.bodyMedium?.copyWith( + color: + themeData.colorScheme.onSurface.withValues(alpha: 0.6), + ), + ), + ], ), ], );