From f4f80499778c7ee5b8c83aa6a16497afa8af4206 Mon Sep 17 00:00:00 2001 From: kodjomoustapha <107993382+kodjodevf@users.noreply.github.com> Date: Wed, 31 Jan 2024 13:53:12 +0100 Subject: [PATCH] Update CONTRIBUTING --- CONTRIBUTING.md | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 080364b4..fa0475cc 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -33,7 +33,7 @@ and you will see this : import 'package:mangayomi/models/source.dart'; //For testing purposes, set to true -const useTestSourceCode = false; +const useTestSourceCode = true; final testSourceModelList = [ Source( @@ -51,10 +51,13 @@ final testSourceModelList = [ const testSourceCode = r''' import 'package:mangayomi/bridge_lib.dart'; -import 'dart:convert'; class TestSource extends MProvider { - TestSource(); + TestSource({required this.source}); + + MSource source; + + final Client client = Client(source); @override bool get supportsLatest => true; @@ -70,8 +73,7 @@ class TestSource extends MProvider { } @override - Future search( - String query, int page, FilterList filterList) async { + Future search(String query, int page, FilterList filterList) async { // TODO: implement } @@ -104,7 +106,7 @@ class TestSource extends MProvider { } TestSource main(MSource source) { - return TestSource(); + return TestSource(source:source); } '''; @@ -238,7 +240,7 @@ Return Response ```bash - Simple request -final client = Client(); +final Client client = Client(); final res = await client.get(Uri.parse("http://example.com")); @@ -246,7 +248,7 @@ print(res.body); - With headers -final client = Client(); +final Client client = Client(); final res = await client.get(Uri.parse("http://example.com"),headers:{"Referer": "http://example.com"}); @@ -254,7 +256,7 @@ print(res.body); - With body -final client = Client(); +final Client client = Client(); final res = await client.post(Uri.parse("http://example.com"),headers:{"Referer": "http://example.com"},'body':{'name':'test'});