Bug fixes
This commit is contained in:
parent
de9c0c80d6
commit
0941a2f4d1
|
@ -1,3 +1,7 @@
|
|||
## 2.0.3
|
||||
|
||||
- Bug fixes
|
||||
|
||||
## 2.0.2
|
||||
|
||||
- Fixed formatting
|
||||
|
|
|
@ -519,6 +519,14 @@ class JishoWordSource {
|
|||
this.word,
|
||||
});
|
||||
|
||||
// ignore: public_member_api_docs
|
||||
factory JishoWordSource.fromJson(Map<String, dynamic> json) {
|
||||
return JishoWordSource(
|
||||
language: json['language'] as String,
|
||||
word: json['word'] as String?,
|
||||
);
|
||||
}
|
||||
|
||||
// ignore: public_member_api_docs
|
||||
Map<String, dynamic> toJson() => {
|
||||
'language:': language,
|
||||
|
@ -571,25 +579,28 @@ class JishoWordSense {
|
|||
// ignore: public_member_api_docs
|
||||
factory JishoWordSense.fromJson(Map<String, dynamic> json) {
|
||||
return JishoWordSense(
|
||||
englishDefinitions: (json['english_definitions'] as List)
|
||||
.map((result) => result as String)
|
||||
.toList(),
|
||||
partsOfSpeech: (json['parts_of_speech'] as List)
|
||||
.map((result) => result as String)
|
||||
.toList(),
|
||||
links: (json['links'] as List)
|
||||
.map((result) => JishoSenseLink.fromJson(result))
|
||||
.toList(),
|
||||
tags: (json['tags'] as List).map((result) => result as String).toList(),
|
||||
seeAlso: (json['see_also'] as List)
|
||||
.map((result) => result as String)
|
||||
.toList(),
|
||||
antonyms: (json['antonyms'] as List)
|
||||
.map((result) => result as String)
|
||||
.toList(),
|
||||
source: json['source'] as List<JishoWordSource>,
|
||||
info: (json['info'] as List).map((result) => result as String).toList(),
|
||||
restrictions: json['restrictions'] as List<String>);
|
||||
englishDefinitions: (json['english_definitions'] as List)
|
||||
.map((result) => result as String)
|
||||
.toList(),
|
||||
partsOfSpeech: (json['parts_of_speech'] as List)
|
||||
.map((result) => result as String)
|
||||
.toList(),
|
||||
links: (json['links'] as List)
|
||||
.map((result) => JishoSenseLink.fromJson(result))
|
||||
.toList(),
|
||||
tags: (json['tags'] as List).map((result) => result as String).toList(),
|
||||
seeAlso:
|
||||
(json['see_also'] as List).map((result) => result as String).toList(),
|
||||
antonyms:
|
||||
(json['antonyms'] as List).map((result) => result as String).toList(),
|
||||
source: (json['source'] as List)
|
||||
.map((result) => JishoWordSource.fromJson(result))
|
||||
.toList(),
|
||||
info: (json['info'] as List).map((result) => result as String).toList(),
|
||||
restrictions: (json['restrictions'] as List)
|
||||
.map((result) => result as String)
|
||||
.toList(),
|
||||
);
|
||||
}
|
||||
|
||||
// ignore: public_member_api_docs
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
name: unofficial_jisho_api
|
||||
version: 2.0.2
|
||||
version: 2.0.3
|
||||
|
||||
description: An unofficial api for searching and scraping the japanese dictionary Jisho.org
|
||||
homepage: https://github.com/h7x4ABk3g/unofficial_jisho_api_dart/
|
||||
|
|
Loading…
Reference in New Issue