mirror of
https://github.com/kodjodevf/mangayomi.git
synced 2026-03-11 17:25:32 +00:00
+
This commit is contained in:
parent
6deffa4b97
commit
fcb67ffd36
2 changed files with 13 additions and 2 deletions
|
|
@ -83,7 +83,13 @@ class Client {
|
|||
Future<String> _toHttpResponse(Client client, String method, List args) async {
|
||||
final url = args[2] as String;
|
||||
final headers = (args[3] as Map?)?.toMapStringString;
|
||||
final body = args.length >= 5 ? (args[4] as Map?)?.toMapStringDynamic : null;
|
||||
final body = args.length >= 5
|
||||
? args[4] is List
|
||||
? args[4] as List
|
||||
: args[4] is String
|
||||
? args[4] as String
|
||||
: (args[4] as Map?)?.toMapStringDynamic
|
||||
: null;
|
||||
var request = http.Request(method, Uri.parse(url));
|
||||
request.headers.addAll(headers ?? {});
|
||||
if ((request.headers[HttpHeaders.contentTypeHeader]
|
||||
|
|
|
|||
|
|
@ -135,7 +135,8 @@ class _CodeEditorPageState extends ConsumerState<CodeEditorPage> {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final filterList = source != null ? getFilterList(source: source!) : [];
|
||||
List<dynamic> filterList =
|
||||
source != null ? getFilterList(source: source!) : [];
|
||||
final appFontFamily = ref.watch(appFontFamilyProvider);
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
|
|
@ -351,6 +352,10 @@ class _CodeEditorPageState extends ConsumerState<CodeEditorPage> {
|
|||
ElevatedButton(
|
||||
onPressed: () async {
|
||||
if (source != null) {
|
||||
setState(() {
|
||||
filterList =
|
||||
getFilterList(source: source!);
|
||||
});
|
||||
try {
|
||||
if (filters.isEmpty) {
|
||||
filters = filterList;
|
||||
|
|
|
|||
Loading…
Reference in a new issue