rewrite pkg

This commit is contained in:
lollipopkit
2023-04-27 18:46:13 +08:00
parent 3a17a24774
commit 90e25856cf
6 changed files with 186 additions and 119 deletions

View File

@@ -204,6 +204,7 @@ class _PkgManagePageState extends State<PkgManagePage>
overflow: TextOverflow.ellipsis,
style: grey,
),
initiallyExpanded: true,
children: apt.upgradeLog == null
? [
TextButton(
@@ -225,11 +226,17 @@ class _PkgManagePageState extends State<PkgManagePage>
}
Widget _buildUpdateItem(UpgradePkgInfo info, PkgProvider apt) {
final t = () {
if (info.nowVersion.isNotEmpty && info.newVersion.isNotEmpty) {
return '${info.nowVersion} -> ${info.newVersion}';
}
return info.newVersion;
}();
return ListTile(
title: Text(info.package),
subtitle: Text(
'${info.nowVersion} -> ${info.newVersion}',
style: grey,
t,
style: grey
),
);
}