fix: unselect tag on tap on selected one
This commit is contained in:
parent
e7ed34bb78
commit
ee5362ad6c
1 changed files with 6 additions and 0 deletions
|
@ -316,6 +316,12 @@ class _HomePageState extends State<HomePage> {
|
|||
? TagChipState.selected
|
||||
: TagChipState.unselected,
|
||||
onTap: () {
|
||||
if (selectedTag == _codes!.tags[index - 1]) {
|
||||
selectedTag = "";
|
||||
setState(() {});
|
||||
_applyFilteringAndRefresh();
|
||||
return;
|
||||
}
|
||||
selectedTag = _codes!.tags[index - 1];
|
||||
setState(() {});
|
||||
_applyFilteringAndRefresh();
|
||||
|
|
Loading…
Add table
Reference in a new issue