mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-05-31 08:08:19 +08:00
opt: notify-debugger-on-exception (#1750)
This commit is contained in:
committed by
GitHub
parent
76c2de4394
commit
0f8166620e
@@ -14,7 +14,6 @@ import 'package:PiliPlus/utils/extension.dart';
|
||||
import 'package:PiliPlus/utils/request_utils.dart';
|
||||
import 'package:PiliPlus/utils/wbi_sign.dart';
|
||||
import 'package:dio/dio.dart';
|
||||
import 'package:flutter/foundation.dart' show kDebugMode;
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_smart_dialog/flutter_smart_dialog.dart';
|
||||
|
||||
@@ -44,6 +43,7 @@ class SearchHttp {
|
||||
}
|
||||
|
||||
// 分类搜索
|
||||
@pragma('vm:notify-debugger-on-exception')
|
||||
static Future<LoadingState<R>> searchByType<R extends SearchNumData>({
|
||||
required SearchType searchType,
|
||||
required String keyword,
|
||||
@@ -120,9 +120,6 @@ class SearchHttp {
|
||||
}
|
||||
return Success(data);
|
||||
} catch (e, s) {
|
||||
if (kDebugMode) {
|
||||
rethrow;
|
||||
}
|
||||
return Error('$e\n\n$s');
|
||||
}
|
||||
} else {
|
||||
@@ -133,6 +130,7 @@ class SearchHttp {
|
||||
}
|
||||
}
|
||||
|
||||
@pragma('vm:notify-debugger-on-exception')
|
||||
static Future<LoadingState<SearchAllData>> searchAll({
|
||||
required String keyword,
|
||||
required page,
|
||||
@@ -168,9 +166,6 @@ class SearchHttp {
|
||||
try {
|
||||
return Success(SearchAllData.fromJson(res.data['data']));
|
||||
} catch (e, s) {
|
||||
if (kDebugMode) {
|
||||
rethrow;
|
||||
}
|
||||
return Error('$e\n\n$s');
|
||||
}
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user