opt: unnecessary_non_null_assertion (#1762)

This commit is contained in:
My-Responsitories
2025-12-03 17:35:42 +08:00
committed by GitHub
parent b7a277a57c
commit 2b3ec77e92
89 changed files with 249 additions and 247 deletions

View File

@@ -27,12 +27,12 @@ class RcmdController extends CommonListController {
@override
void handleListResponse(List dataList) {
if (enableSaveLastData && page == 0 && loadingState.value.isSuccess) {
List? currentList = loadingState.value.data;
if (currentList?.isNotEmpty == true) {
final currentList = loadingState.value.data;
if (currentList != null && currentList.isNotEmpty) {
if (savedRcmdTip) {
lastRefreshAt = dataList.length;
}
if (currentList!.length > 500) {
if (currentList.length > 500) {
currentList.removeRange(50, currentList.length);
}
dataList.addAll(currentList);