new: pull to refresh on server tab
This commit is contained in:
@@ -267,7 +267,7 @@ class _MyHomePageState extends State<MyHomePage>
|
||||
),
|
||||
)
|
||||
],
|
||||
child: Text(_s.license),
|
||||
child: Text(_s.about),
|
||||
)
|
||||
],
|
||||
),
|
||||
|
||||
@@ -220,7 +220,7 @@ class _ServerDetailPageState extends State<ServerDetailPage>
|
||||
children: [
|
||||
Text('${used.toStringAsFixed(0)}%', style: textSize27),
|
||||
width7,
|
||||
Text('of ${(ss.mem.total * 1024).convertBytes} Mem',
|
||||
Text('of ${(ss.mem.total * 1024).convertBytes}',
|
||||
style: textSize13Grey)
|
||||
],
|
||||
),
|
||||
@@ -233,9 +233,7 @@ class _ServerDetailPageState extends State<ServerDetailPage>
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(
|
||||
height: 11,
|
||||
),
|
||||
height13,
|
||||
_buildProgress(used)
|
||||
],
|
||||
),
|
||||
@@ -262,7 +260,7 @@ class _ServerDetailPageState extends State<ServerDetailPage>
|
||||
children: [
|
||||
Text('${used.toStringAsFixed(0)}%', style: textSize27),
|
||||
width7,
|
||||
Text('of ${(ss.swap.total * 1024).convertBytes} Swap',
|
||||
Text('of ${(ss.swap.total * 1024).convertBytes} ',
|
||||
style: textSize13Grey)
|
||||
],
|
||||
),
|
||||
@@ -275,9 +273,7 @@ class _ServerDetailPageState extends State<ServerDetailPage>
|
||||
),
|
||||
],
|
||||
),
|
||||
const SizedBox(
|
||||
height: 11,
|
||||
),
|
||||
height13,
|
||||
_buildProgress(used)
|
||||
],
|
||||
),
|
||||
|
||||
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user