mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-27 11:38:40 +00:00
@@ -215,7 +215,7 @@ class SSearchController extends GetxController
|
||||
|
||||
@override
|
||||
Future<void> onValueChanged(String value) async {
|
||||
var res = await SearchHttp.searchSuggest(term: value);
|
||||
final res = await SearchHttp.searchSuggest(term: value);
|
||||
if (res case Success(:final response)) {
|
||||
if (response.tag?.isNotEmpty == true) {
|
||||
searchSuggestList.value = response.tag!;
|
||||
|
||||
@@ -416,7 +416,7 @@ class _SearchPageState extends State<SearchPage> {
|
||||
bool isTrending,
|
||||
) {
|
||||
return switch (loadingState) {
|
||||
Success(:var response) =>
|
||||
Success(:final response) =>
|
||||
response.list?.isNotEmpty == true
|
||||
? LayoutBuilder(
|
||||
builder: (context, constraints) => HotKeyword(
|
||||
@@ -426,7 +426,7 @@ class _SearchPageState extends State<SearchPage> {
|
||||
),
|
||||
)
|
||||
: const SizedBox.shrink(),
|
||||
Error(:var errMsg) => errorWidget(
|
||||
Error(:final errMsg) => errorWidget(
|
||||
errMsg: errMsg,
|
||||
onReload: isTrending
|
||||
? _searchController.queryTrendingList
|
||||
|
||||
@@ -25,7 +25,7 @@ class HotKeyword extends StatelessWidget {
|
||||
runSpacing: 0.4,
|
||||
spacing: 5.0,
|
||||
children: [
|
||||
for (var i in hotSearchList)
|
||||
for (final i in hotSearchList)
|
||||
SizedBox(
|
||||
width: width,
|
||||
child: Material(
|
||||
|
||||
Reference in New Issue
Block a user