new: pull to refresh on server tab

This commit is contained in:
lollipopkit
2023-02-17 15:55:34 +08:00
parent 1aac166c43
commit 99aa0fc1f5
12 changed files with 46 additions and 25 deletions

View File

@@ -76,6 +76,7 @@ class _ServerPageState extends State<ServerPage>
return ListView.separated(
padding: const EdgeInsets.all(7),
controller: ScrollController(),
physics: const AlwaysScrollableScrollPhysics(),
itemBuilder: (ctx, idx) {
if (idx == pro.servers.length) {
return SizedBox(height: _media.padding.bottom);
@@ -90,7 +91,7 @@ class _ServerPageState extends State<ServerPage>
},
);
return Scaffold(
body: child,
body: RefreshIndicator(child: child, onRefresh: () async => await _serverProvider.refreshData(onlyFailed: true)),
floatingActionButton: FloatingActionButton(
onPressed: () => AppRoute(
const ServerEditPage(),