migrate: material 3

This commit is contained in:
lollipopkit
2023-05-07 01:28:51 +08:00
parent e932241df0
commit 5afa543ba5
29 changed files with 438 additions and 480 deletions

View File

@@ -58,10 +58,9 @@ class PkgProvider extends BusyProvider {
}
Future<void> refresh() async {
final result = await _update();_parse(result);
try {
} catch (e) {
final result = await _update();
_parse(result);
try {} catch (e) {
error = '[Server Raw]:\n$result\n[App Error]:\n$e';
} finally {
notifyListeners();
@@ -70,11 +69,8 @@ class PkgProvider extends BusyProvider {
void _parse(String? raw) {
if (raw == null) return;
final list = type
?.updateListRemoveUnused(raw.split('\n'));
upgradeable = list
?.map((e) => UpgradePkgInfo(e, type))
.toList();
final list = type?.updateListRemoveUnused(raw.split('\n'));
upgradeable = list?.map((e) => UpgradePkgInfo(e, type)).toList();
}
Future<String?> _update() async {