Merge pull request #98 from SyncrowIOT:SP-1186-FE-Cursor-Resets-After-Each-Character-When-Creating-a-Tag

fixed text theme of tag list
This commit is contained in:
hannathkadher
2025-02-20 11:48:36 +04:00
committed by GitHub

View File

@ -88,16 +88,34 @@ class _DialogTextfieldDropdownState extends State<DialogTextfieldDropdown> {
itemCount: _filteredItems.length, itemCount: _filteredItems.length,
itemBuilder: (context, index) { itemBuilder: (context, index) {
final item = _filteredItems[index]; final item = _filteredItems[index];
return ListTile(
title: Text( return Container(
item, decoration: const BoxDecoration(
style: const TextStyle(color: Colors.black), 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();
},
), ),
onTap: () {
_controller.text = item;
widget.onSelected(item);
_closeDropdown();
},
); );
}, },
); );
@ -139,7 +157,7 @@ class _DialogTextfieldDropdownState extends State<DialogTextfieldDropdown> {
widget.onSelected(_controller.text); widget.onSelected(_controller.text);
_closeDropdown(); _closeDropdown();
}, },
style: const TextStyle(color: Colors.black), style: Theme.of(context).textTheme.bodyMedium,
decoration: const InputDecoration( decoration: const InputDecoration(
hintText: 'Enter or Select a tag', hintText: 'Enter or Select a tag',
border: InputBorder.none, border: InputBorder.none,