Made servers closeable by clicking again #22
1 changed files with 6 additions and 2 deletions
|
@ -345,8 +345,12 @@ class _ServerListState extends State<ServerList> {
|
||||||
}
|
}
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: () {
|
onTap: () {
|
||||||
setState(() => selectedServer = index);
|
setState(() {
|
||||||
print(index.toString() + " clicked");
|
if (selectedServer == index)
|
||||||
|
selectedServer = -1;
|
||||||
|
else
|
||||||
|
selectedServer = index;
|
||||||
|
});
|
||||||
},
|
},
|
||||||
child: Container(
|
child: Container(
|
||||||
width: MediaQuery.of(context).size.width,
|
width: MediaQuery.of(context).size.width,
|
||||||
|
|
Loading…
Reference in a new issue