增加暂无数据的提醒

This commit is contained in:
NewTab
2022-01-22 22:42:03 +08:00
parent 6a20abae19
commit a83206bf4b
3 changed files with 15 additions and 3 deletions

View File

@@ -114,6 +114,9 @@ class _ScriptPageState extends ConsumerState<ScriptPage> with LazyLoadState<Scri
HttpResponse<List<ScriptBean>> response = await Api.scripts();
if (response.success) {
if (response.bean == null || response.bean!.isEmpty) {
"暂无数据".toast();
}
list.clear();
list.addAll(response.bean ?? []);
setState(() {});