1
0
mirror of https://github.com/h7x4/unofficial_jisho_api_dart.git synced 2025-12-19 17:00:41 +01:00

Update to 3.0.0

- Add fromJson factories for all objects
- Make some properties use getters, to reduce redundant data
- Make all objects comparable with the equatable package
- Make all objects immutable with a constant constructor
    as a result of making them comparable
This commit is contained in:
2022-05-08 02:06:45 +02:00
parent e37de1bdb1
commit a84cfe5c02
22 changed files with 1882 additions and 898 deletions

View File

@@ -53,10 +53,7 @@ Future<PhrasePageScrapeResult> scrapeForPhrase(String phrase) async {
final uri = uriForPhraseScrape(phrase);
final response = await http.get(uri);
if (response.statusCode == 404) {
return PhrasePageScrapeResult(
query: phrase,
found: false,
);
return PhrasePageScrapeResult(query: phrase);
}
return parsePhrasePageData(response.body, phrase);
}