diff --git a/lib/features/home/presentation/widgets/home_header.dart b/lib/features/home/presentation/widgets/home_header.dart index 297d9f9..735ad8c 100644 --- a/lib/features/home/presentation/widgets/home_header.dart +++ b/lib/features/home/presentation/widgets/home_header.dart @@ -312,135 +312,138 @@ class _MenuDrawer extends ConsumerWidget { ), // Bottom section: Log Out or Login buttons - Padding( - padding: - const EdgeInsets.symmetric(horizontal: 24, vertical: 16), - child: isAuthenticated - ? // Log Out button - filled orange - SizedBox( - width: double.infinity, - height: 54, - child: ElevatedButton.icon( - onPressed: () { - Navigator.pop(context); - ref.read(authProvider.notifier).logout(); - }, - icon: const Icon( - Icons.logout_rounded, - color: AppColors.primaryDark, - size: 24, - ), - label: const Text( - 'Log Out', - style: TextStyle( - fontFamily: 'Fractul', - fontSize: 14, - fontWeight: FontWeight.w700, + SafeArea( + top: false, + child: Padding( + padding: + const EdgeInsets.symmetric(horizontal: 24, vertical: 16), + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + if (isAuthenticated) ...[ + // Log Out button - filled orange + SizedBox( + width: double.infinity, + height: 54, + child: ElevatedButton.icon( + onPressed: () { + Navigator.pop(context); + ref.read(authProvider.notifier).logout(); + }, + icon: const Icon( + Icons.logout_rounded, color: AppColors.primaryDark, + size: 24, ), - ), - style: ElevatedButton.styleFrom( - backgroundColor: AppColors.accentOrange, - elevation: 0, - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(15), + label: const Text( + 'Log Out', + style: TextStyle( + fontFamily: 'Fractul', + fontSize: 14, + fontWeight: FontWeight.w700, + color: AppColors.primaryDark, + ), + ), + style: ElevatedButton.styleFrom( + backgroundColor: AppColors.accentOrange, + elevation: 0, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(15), + ), ), ), ), - ) - : // Login / Sign Up buttons - Column( - mainAxisSize: MainAxisSize.min, - children: [ - SizedBox( - width: double.infinity, - height: 54, - child: ElevatedButton.icon( - onPressed: () { - Navigator.pop(context); - context.push('/login'); - }, - icon: const Icon( - Icons.login, + ] else ...[ + // Login button + SizedBox( + width: double.infinity, + height: 54, + child: ElevatedButton.icon( + onPressed: () { + Navigator.pop(context); + context.push('/login'); + }, + icon: const Icon( + Icons.login, + color: Colors.white, + size: 20, + ), + label: const Text( + 'Log In', + style: TextStyle( + fontFamily: 'Fractul', + fontSize: 16, + fontWeight: FontWeight.w700, color: Colors.white, - size: 20, ), - label: const Text( - 'Log In', - style: TextStyle( - fontFamily: 'Fractul', - fontSize: 16, - fontWeight: FontWeight.w700, - color: Colors.white, - ), - ), - style: ElevatedButton.styleFrom( - backgroundColor: AppColors.accentOrange, - elevation: 0, - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(15), - ), + ), + style: ElevatedButton.styleFrom( + backgroundColor: AppColors.accentOrange, + elevation: 0, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(15), ), ), ), - const SizedBox(height: 12), - SizedBox( - width: double.infinity, - height: 54, - child: OutlinedButton.icon( - onPressed: () { - Navigator.pop(context); - context.push('/signup'); - }, - icon: const Icon( - Icons.person_add_outlined, + ), + const SizedBox(height: 12), + // Sign Up button + SizedBox( + width: double.infinity, + height: 54, + child: OutlinedButton.icon( + onPressed: () { + Navigator.pop(context); + context.push('/signup'); + }, + icon: const Icon( + Icons.person_add_outlined, + color: AppColors.accentOrange, + size: 20, + ), + label: const Text( + 'Sign Up', + style: TextStyle( + fontFamily: 'Fractul', + fontSize: 16, + fontWeight: FontWeight.w700, color: AppColors.accentOrange, - size: 20, ), - label: const Text( - 'Sign Up', - style: TextStyle( - fontFamily: 'Fractul', - fontSize: 16, - fontWeight: FontWeight.w700, - color: AppColors.accentOrange, - ), + ), + style: OutlinedButton.styleFrom( + side: const BorderSide( + color: AppColors.accentOrange, + width: 1.5, ), - style: OutlinedButton.styleFrom( - side: const BorderSide( - color: AppColors.accentOrange, - width: 1.5, - ), - shape: RoundedRectangleBorder( - borderRadius: BorderRadius.circular(15), - ), + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(15), ), ), ), - ], + ), + ], + // Version number + const SizedBox(height: 12), + FutureBuilder( + future: PackageInfo.fromPlatform(), + builder: (context, snapshot) { + final version = snapshot.hasData + ? 'v${snapshot.data!.version} (${snapshot.data!.buildNumber})' + : ''; + return Text( + version, + style: const TextStyle( + fontFamily: 'SourceSerif4', + fontSize: 12, + fontWeight: FontWeight.w400, + color: AppColors.hintText, + ), + ); + }, ), - ), - - // Version number - FutureBuilder( - future: PackageInfo.fromPlatform(), - builder: (context, snapshot) { - final version = snapshot.hasData - ? 'v${snapshot.data!.version} (${snapshot.data!.buildNumber})' - : ''; - return Padding( - padding: const EdgeInsets.only(bottom: 16), - child: Text( - version, - style: const TextStyle( - fontFamily: 'SourceSerif4', - fontSize: 12, - fontWeight: FontWeight.w400, - color: AppColors.hintText, - ), - ), - ); - }, + ], + ), + ), ), ], ), diff --git a/lib/features/messaging/presentation/screens/chat_screen.dart b/lib/features/messaging/presentation/screens/chat_screen.dart index 4332b5e..f582478 100644 --- a/lib/features/messaging/presentation/screens/chat_screen.dart +++ b/lib/features/messaging/presentation/screens/chat_screen.dart @@ -985,8 +985,10 @@ class _ChatScreenState extends ConsumerState { const SizedBox(height: 6), // Message content _buildMessageContent(message, isMine: true), - // Show text content below media if present - if (isMediaMessage && message.content.isNotEmpty) + // Show text content below media if present (but not URLs/GIF links) + if (isMediaMessage && + message.content.isNotEmpty && + !message.content.trim().startsWith('http')) Padding( padding: const EdgeInsets.only(top: 4), child: Text( @@ -1071,8 +1073,10 @@ class _ChatScreenState extends ConsumerState { const SizedBox(height: 6), // Message content _buildMessageContent(message, isMine: false), - // Show text content below media if present - if (isMediaMessage && message.content.isNotEmpty) + // Show text content below media if present (but not URLs/GIF links) + if (isMediaMessage && + message.content.isNotEmpty && + !message.content.trim().startsWith('http')) Padding( padding: const EdgeInsets.only(top: 4), child: Text(