Optimized view logic

This commit is contained in:
LollipopKit
2021-11-02 15:48:24 +08:00
parent 3105552eae
commit 9e73dd07ca
4 changed files with 46 additions and 21 deletions

View File

@@ -88,21 +88,14 @@ class _ServerPageState extends State<ServerPage>
}
Widget _buildEachServerCard(ServerInfo si) {
return GestureDetector(
child: _buildEachCardContent(si),
onLongPress: () {
AppRoute(
return Card(
child: InkWell(
onLongPress: () => AppRoute(
ServerEditPage(
spi: si.info,
),
'Edit server info page')
.go(context);
});
}
Widget _buildEachCardContent(ServerInfo si) {
return Card(
child: InkWell(
.go(context),
child: Padding(
padding: const EdgeInsets.all(13),
child: