mirror of
https://github.com/JGeek00/adguard-home-manager.git
synced 2025-04-25 08:16:06 +00:00
Added pull to refresh clients
This commit is contained in:
parent
e8d3e14245
commit
5fa174ffc5
1 changed files with 70 additions and 65 deletions
|
@ -43,6 +43,7 @@ class _ClientsListState extends State<ClientsList> {
|
|||
|
||||
isVisible = true;
|
||||
widget.scrollController.addListener(() {
|
||||
if (mounted) {
|
||||
if (widget.scrollController.position.userScrollDirection == ScrollDirection.reverse) {
|
||||
if (mounted && isVisible == true) {
|
||||
setState(() => isVisible = false);
|
||||
|
@ -55,6 +56,7 @@ class _ClientsListState extends State<ClientsList> {
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -232,7 +234,9 @@ class _ClientsListState extends State<ClientsList> {
|
|||
case 1:
|
||||
return Stack(
|
||||
children: [
|
||||
Column(
|
||||
RefreshIndicator(
|
||||
onRefresh: widget.fetchClients,
|
||||
child: Column(
|
||||
mainAxisSize: MainAxisSize.max,
|
||||
children: [
|
||||
Padding(
|
||||
|
@ -296,6 +300,7 @@ class _ClientsListState extends State<ClientsList> {
|
|||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
AnimatedPositioned(
|
||||
duration: const Duration(milliseconds: 100),
|
||||
curve: Curves.easeInOut,
|
||||
|
|
Loading…
Add table
Reference in a new issue