mirror of
https://github.com/qinglong-app/qinglong_app.git
synced 2025-10-09 16:48:19 +08:00
增加暂无数据的提醒
This commit is contained in:
@@ -21,7 +21,8 @@ class LoginLogPage extends ConsumerStatefulWidget {
|
|||||||
_LoginLogPageState createState() => _LoginLogPageState();
|
_LoginLogPageState createState() => _LoginLogPageState();
|
||||||
}
|
}
|
||||||
|
|
||||||
class _LoginLogPageState extends ConsumerState<LoginLogPage> with LazyLoadState<LoginLogPage> {
|
class _LoginLogPageState extends ConsumerState<LoginLogPage>
|
||||||
|
with LazyLoadState<LoginLogPage> {
|
||||||
List<LoginLogBean> list = [];
|
List<LoginLogBean> list = [];
|
||||||
|
|
||||||
@override
|
@override
|
||||||
@@ -65,7 +66,8 @@ class _LoginLogPageState extends ConsumerState<LoginLogPage> with LazyLoadState<
|
|||||||
selectionWidthStyle: BoxWidthStyle.max,
|
selectionWidthStyle: BoxWidthStyle.max,
|
||||||
selectionHeightStyle: BoxHeightStyle.max,
|
selectionHeightStyle: BoxHeightStyle.max,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: ref.watch(themeProvider).themeColor.descColor(),
|
color:
|
||||||
|
ref.watch(themeProvider).themeColor.descColor(),
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -77,7 +79,8 @@ class _LoginLogPageState extends ConsumerState<LoginLogPage> with LazyLoadState<
|
|||||||
selectionWidthStyle: BoxWidthStyle.max,
|
selectionWidthStyle: BoxWidthStyle.max,
|
||||||
selectionHeightStyle: BoxHeightStyle.max,
|
selectionHeightStyle: BoxHeightStyle.max,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: ref.watch(themeProvider).themeColor.descColor(),
|
color:
|
||||||
|
ref.watch(themeProvider).themeColor.descColor(),
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@@ -106,6 +109,9 @@ class _LoginLogPageState extends ConsumerState<LoginLogPage> with LazyLoadState<
|
|||||||
HttpResponse<List<LoginLogBean>> response = await Api.loginLog();
|
HttpResponse<List<LoginLogBean>> response = await Api.loginLog();
|
||||||
|
|
||||||
if (response.success) {
|
if (response.success) {
|
||||||
|
if (response.bean == null || response.bean!.isEmpty) {
|
||||||
|
"暂无数据".toast();
|
||||||
|
}
|
||||||
list.clear();
|
list.clear();
|
||||||
list.addAll(response.bean ?? []);
|
list.addAll(response.bean ?? []);
|
||||||
setState(() {});
|
setState(() {});
|
||||||
|
|||||||
@@ -114,6 +114,9 @@ class _ScriptPageState extends ConsumerState<ScriptPage> with LazyLoadState<Scri
|
|||||||
HttpResponse<List<ScriptBean>> response = await Api.scripts();
|
HttpResponse<List<ScriptBean>> response = await Api.scripts();
|
||||||
|
|
||||||
if (response.success) {
|
if (response.success) {
|
||||||
|
if (response.bean == null || response.bean!.isEmpty) {
|
||||||
|
"暂无数据".toast();
|
||||||
|
}
|
||||||
list.clear();
|
list.clear();
|
||||||
list.addAll(response.bean ?? []);
|
list.addAll(response.bean ?? []);
|
||||||
setState(() {});
|
setState(() {});
|
||||||
|
|||||||
@@ -88,6 +88,9 @@ class _TaskLogPageState extends ConsumerState<TaskLogPage> with LazyLoadState<Ta
|
|||||||
HttpResponse<List<TaskLogBean>> response = await Api.taskLog();
|
HttpResponse<List<TaskLogBean>> response = await Api.taskLog();
|
||||||
|
|
||||||
if (response.success) {
|
if (response.success) {
|
||||||
|
if (response.bean == null || response.bean!.isEmpty) {
|
||||||
|
"暂无数据".toast();
|
||||||
|
}
|
||||||
list.clear();
|
list.clear();
|
||||||
list.addAll(response.bean ?? []);
|
list.addAll(response.bean ?? []);
|
||||||
setState(() {});
|
setState(() {});
|
||||||
|
|||||||
Reference in New Issue
Block a user