| 1 | import 'package:flutter/material.dart'; |
| 2 | import 'package:flutter_riverpod/flutter_riverpod.dart'; |
| 3 | import 'package:localmind/core/theme/colors.dart'; |
| 4 | |
| 5 | import '../../../l10n/app_localizations.dart'; |
| 6 | |
| 7 | class ConversationDrawerHeader extends ConsumerWidget { |
| 8 | const ConversationDrawerHeader({super.key}); |
| 9 | |
| 10 | @override |
| 11 | Widget build(BuildContext context, WidgetRef ref) { |
| 12 | final l10n = AppLocalizations.of(context)!; |
| 13 | final theme = Theme.of(context); |
| 14 | final isDark = theme.brightness == Brightness.dark; |
| 15 | |
| 16 | return Container( |
| 17 | padding: const EdgeInsets.only(left: 16, right: 16, top: 16, bottom: 8), |
| 18 | child: Row( |
| 19 | children: [ |
| 20 | Container( |
| 21 | padding: const EdgeInsets.all(8), |
| 22 | decoration: BoxDecoration(borderRadius: BorderRadius.circular(8)), |
| 23 | child: Image.asset( |
| 24 | 'assets/images/logo.webp', |
| 25 | width: 24, |
| 26 | height: 24, |
| 27 | ), |
| 28 | ), |
| 29 | const SizedBox(width: 12), |
| 30 | Text( |
| 31 | l10n.app_name, |
| 32 | style: TextStyle( |
| 33 | fontSize: 18, |
| 34 | fontWeight: FontWeight.bold, |
| 35 | color: isDark |
| 36 | ? AppColors.darkPrimaryText |
| 37 | : AppColors.lightPrimaryText, |
| 38 | ), |
| 39 | ), |
| 40 | ], |
| 41 | ), |
| 42 | ); |
| 43 | } |
| 44 | } |