mirror of
https://github.com/JGeek00/adguard-home-manager.git
synced 2025-04-25 16:26:07 +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;
|
isVisible = true;
|
||||||
widget.scrollController.addListener(() {
|
widget.scrollController.addListener(() {
|
||||||
|
if (mounted) {
|
||||||
if (widget.scrollController.position.userScrollDirection == ScrollDirection.reverse) {
|
if (widget.scrollController.position.userScrollDirection == ScrollDirection.reverse) {
|
||||||
if (mounted && isVisible == true) {
|
if (mounted && isVisible == true) {
|
||||||
setState(() => isVisible = false);
|
setState(() => isVisible = false);
|
||||||
|
@ -55,6 +56,7 @@ class _ClientsListState extends State<ClientsList> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -232,7 +234,9 @@ class _ClientsListState extends State<ClientsList> {
|
||||||
case 1:
|
case 1:
|
||||||
return Stack(
|
return Stack(
|
||||||
children: [
|
children: [
|
||||||
Column(
|
RefreshIndicator(
|
||||||
|
onRefresh: widget.fetchClients,
|
||||||
|
child: Column(
|
||||||
mainAxisSize: MainAxisSize.max,
|
mainAxisSize: MainAxisSize.max,
|
||||||
children: [
|
children: [
|
||||||
Padding(
|
Padding(
|
||||||
|
@ -296,6 +300,7 @@ class _ClientsListState extends State<ClientsList> {
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
),
|
||||||
AnimatedPositioned(
|
AnimatedPositioned(
|
||||||
duration: const Duration(milliseconds: 100),
|
duration: const Duration(milliseconds: 100),
|
||||||
curve: Curves.easeInOut,
|
curve: Curves.easeInOut,
|
||||||
|
|
Loading…
Add table
Reference in a new issue