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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user