From b80896f68993431e6cb97b030ff9a4c82414233e Mon Sep 17 00:00:00 2001 From: MiaoMint <1981324730@qq.com> Date: Fri, 11 Aug 2023 01:55:14 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=90=9C=E7=B4=A2=E5=87=BA=E7=8E=B0?= =?UTF-8?q?=E9=87=8D=E5=A4=8D=E7=9A=84=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/pages/search/controller.dart | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/pages/search/controller.dart b/lib/pages/search/controller.dart index 332ab4e4..b396e534 100644 --- a/lib/pages/search/controller.dart +++ b/lib/pages/search/controller.dart @@ -32,7 +32,6 @@ class SearchPageController extends GetxController { Future getResult(String key) async { final futures = []; - for (var i = 0; i < searchResultList.length; i++) { final element = searchResultList[i]; Future> resultFuture; @@ -49,7 +48,7 @@ class SearchPageController extends GetxController { } element.result = result; if (result.isNotEmpty) { - searchResultList.removeAt(i); + searchResultList.remove(element); searchResultList.insert(0, element); } }).catchError((e) {