From 085eb1d78ec620a31085b8fba733bcc12fa67346 Mon Sep 17 00:00:00 2001 From: stonega Date: Wed, 4 Nov 2020 01:53:17 +0800 Subject: [PATCH] Fix listennotes search error. --- lib/home/search_podcast.dart | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/home/search_podcast.dart b/lib/home/search_podcast.dart index d2b64c5..42b2255 100644 --- a/lib/home/search_podcast.dart +++ b/lib/home/search_podcast.dart @@ -407,8 +407,8 @@ class _ListenNotesSearch extends StatefulWidget { } class __ListenNotesSearchState extends State<_ListenNotesSearch> { - int _nextOffset = 0; final List _podcastList = []; + int _nextOffset = 0; int _offset; bool _loading = false; bool _loadError = false; @@ -446,7 +446,8 @@ class __ListenNotesSearchState extends State<_ListenNotesSearch> { return []; } _offset = searchResult.nextOffset; - _podcastList.addAll(searchResult.results.cast()); + var searchList = [...searchResult.results.cast().toList()]; + _podcastList.addAll(searchList); _loading = false; return _podcastList; }