From 57c5f4752c224b75489d3dff6fa3946af24ac471 Mon Sep 17 00:00:00 2001 From: hannathkadher Date: Thu, 20 Feb 2025 11:36:08 +0400 Subject: [PATCH 1/2] fixed theme --- lib/common/dialog_textfield_dropdown.dart | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/lib/common/dialog_textfield_dropdown.dart b/lib/common/dialog_textfield_dropdown.dart index 9c508f28..a63f095a 100644 --- a/lib/common/dialog_textfield_dropdown.dart +++ b/lib/common/dialog_textfield_dropdown.dart @@ -89,10 +89,13 @@ class _DialogTextfieldDropdownState extends State { itemBuilder: (context, index) { final item = _filteredItems[index]; return ListTile( - title: Text( - item, - style: const TextStyle(color: Colors.black), - ), + title: Text(item, + style: Theme.of(context) + .textTheme + .bodyMedium + ?.copyWith( + color: + ColorsManager.textPrimaryColor)), onTap: () { _controller.text = item; widget.onSelected(item); @@ -139,7 +142,7 @@ class _DialogTextfieldDropdownState extends State { widget.onSelected(_controller.text); _closeDropdown(); }, - style: const TextStyle(color: Colors.black), + style: Theme.of(context).textTheme.bodyMedium, decoration: const InputDecoration( hintText: 'Enter or Select a tag', border: InputBorder.none, From 7ee7681e09b3e98307cca3e62d19a90896163cbc Mon Sep 17 00:00:00 2001 From: hannathkadher Date: Thu, 20 Feb 2025 11:47:58 +0400 Subject: [PATCH 2/2] fixed theme --- lib/common/dialog_textfield_dropdown.dart | 41 ++++++++++++++++------- 1 file changed, 28 insertions(+), 13 deletions(-) diff --git a/lib/common/dialog_textfield_dropdown.dart b/lib/common/dialog_textfield_dropdown.dart index a63f095a..ac88e5dc 100644 --- a/lib/common/dialog_textfield_dropdown.dart +++ b/lib/common/dialog_textfield_dropdown.dart @@ -88,19 +88,34 @@ class _DialogTextfieldDropdownState extends State { itemCount: _filteredItems.length, itemBuilder: (context, index) { final item = _filteredItems[index]; - return ListTile( - title: Text(item, - style: Theme.of(context) - .textTheme - .bodyMedium - ?.copyWith( - color: - ColorsManager.textPrimaryColor)), - onTap: () { - _controller.text = item; - widget.onSelected(item); - _closeDropdown(); - }, + + return Container( + decoration: const BoxDecoration( + border: Border( + bottom: BorderSide( + color: ColorsManager.lightGrayBorderColor, + width: 1.0, + ), + ), + ), + child: ListTile( + title: Text(item, + style: Theme.of(context) + .textTheme + .bodyMedium + ?.copyWith( + color: ColorsManager + .textPrimaryColor)), + onTap: () { + _controller.text = item; + widget.onSelected(item); + setState(() { + _filteredItems + .remove(item); // Remove selected item + }); + _closeDropdown(); + }, + ), ); }, );