refactor: enhance search field styling in ChatsDrawer

- Wrapped the TextField in a Material widget to improve styling and ensure proper background handling.
- Added TextDecoration.none to various text styles to remove underlines, enhancing visual consistency.
- Updated the search field's input decoration for better alignment with the app's theme and design standards.
This commit is contained in:
cogwheel0
2025-10-11 14:55:13 +05:30
parent c1059e90d5
commit 499291e594

View File

@@ -178,7 +178,9 @@ class _ChatsDrawerState extends ConsumerState<ChatsDrawer> {
Widget _buildSearchField(BuildContext context) {
final theme = context.conduitTheme;
return TextField(
return Material(
color: Colors.transparent,
child: TextField(
controller: _searchController,
focusNode: _searchFocusNode,
onChanged: (_) => _onSearchChanged(),
@@ -237,6 +239,7 @@ class _ChatsDrawerState extends ConsumerState<ChatsDrawer> {
vertical: Spacing.xs,
),
),
),
);
}
@@ -687,6 +690,7 @@ class _ChatsDrawerState extends ConsumerState<ChatsDrawer> {
style: AppTypography.labelStyle.copyWith(
color: theme.textSecondary,
fontWeight: FontWeight.w600,
decoration: TextDecoration.none,
),
),
const SizedBox(width: Spacing.xs),
@@ -702,7 +706,10 @@ class _ChatsDrawerState extends ConsumerState<ChatsDrawer> {
),
child: Text(
'$count',
style: AppTypography.tiny.copyWith(color: theme.textSecondary),
style: AppTypography.tiny.copyWith(
color: theme.textSecondary,
decoration: TextDecoration.none,
),
),
),
],
@@ -716,7 +723,10 @@ class _ChatsDrawerState extends ConsumerState<ChatsDrawer> {
children: [
Text(
AppLocalizations.of(context)!.folders,
style: AppTypography.labelStyle.copyWith(color: theme.textSecondary),
style: AppTypography.labelStyle.copyWith(
color: theme.textSecondary,
decoration: TextDecoration.none,
),
),
const Spacer(),
IconButton(
@@ -1489,6 +1499,7 @@ class _ChatsDrawerState extends ConsumerState<ChatsDrawer> {
style: AppTypography.bodySmallStyle.copyWith(
color: theme.textPrimary,
fontWeight: FontWeight.w600,
decoration: TextDecoration.none,
),
),
),