fix: state

Signed-off-by: bggRGjQaUbCoE <githubaccount56556@proton.me>
This commit is contained in:
bggRGjQaUbCoE
2025-04-11 10:51:55 +08:00
parent 5aa5308a50
commit 01b30d942b
10 changed files with 61 additions and 19 deletions

View File

@@ -36,6 +36,7 @@ abstract class CommonController<R, T> extends GetxController
bool isLoading = false;
late bool isEnd = false;
Rx<LoadingState> get loadingState;
bool? isReply;
Future<LoadingState<R>> customGetData();
@@ -66,6 +67,8 @@ abstract class CommonController<R, T> extends GetxController
isEnd = true;
if (isRefresh) {
loadingState.value = LoadingState<List<T>?>.success(dataList);
} else if (isReply == true) {
loadingState.refresh();
}
isLoading = false;
return;