ui: improve error readablity

This commit is contained in:
Simon Ding
2024-11-05 12:43:17 +08:00
parent 949b6e5188
commit f1c4e306f4
13 changed files with 44 additions and 26 deletions

View File

@@ -94,7 +94,7 @@ class _AuthState extends ConsumerState<AuthSettings> {
],
));
},
error: (err, trace) => Text("$err"),
error: (err, trace) => PoError(msg: "网络错误", err: err),
loading: () => const MyProgressIndicator());
}
}

View File

@@ -35,7 +35,7 @@ class _DownloaderState extends ConsumerState<DownloaderSettings> {
onTap: () => showDownloadClientDetails(DownloadClient()),
child: const Icon(Icons.add));
})),
error: (err, trace) => Text("$err"),
error: (err, trace) => PoError(msg: "网络错误", err: err),
loading: () => const MyProgressIndicator());
}

View File

@@ -170,7 +170,7 @@ class _GeneralState extends ConsumerState<GeneralSettings> {
),
);
},
error: (err, trace) => Text("$err"),
error: (err, trace) => PoError(msg: "网络错误", err: err),
loading: () => const MyProgressIndicator());
}
}

View File

@@ -35,7 +35,7 @@ class _ImportlistState extends ConsumerState<Importlist> {
child: const Icon(Icons.add));
}),
),
error: (err, trace) => Text("$err"),
error: (err, trace) => PoError(msg: "网络错误", err: err),
loading: () => const MyProgressIndicator());
}

View File

@@ -33,7 +33,7 @@ class _IndexerState extends ConsumerState<IndexerSettings> {
child: const Icon(Icons.add));
}),
),
error: (err, trace) => Text("$err"),
error: (err, trace) => PoError(msg: "网络错误", err: err),
loading: () => const MyProgressIndicator());
}

View File

@@ -48,7 +48,7 @@ class _NotifierState extends ConsumerState<NotifierSettings> {
child: const Icon(Icons.add));
}),
),
error: (err, trace) => Text("$err"),
error: (err, trace) => PoError(msg: "网络错误", err: err),
loading: () => const MyProgressIndicator());
}

View File

@@ -79,7 +79,7 @@ class ProwlarrSettingState extends ConsumerState<ProwlarrSettingPage> {
],
),
),
error: (err, trace) => Text("$err"),
error: (err, trace) => PoError(msg: "网络错误", err: err),
loading: () => const MyProgressIndicator());
}
}

View File

@@ -35,7 +35,7 @@ class _StorageState extends ConsumerState<StorageSettings> {
child: const Icon(Icons.add));
}),
),
error: (err, trace) => Text("$err"),
error: (err, trace) => PoError(msg: "网络错误", err: err),
loading: () => const MyProgressIndicator());
}