Bug fixes

This commit is contained in:
Oystein Kristoffer Tveit 2021-08-10 23:59:27 +02:00
parent de9c0c80d6
commit 0941a2f4d1
3 changed files with 35 additions and 20 deletions

View File

@ -1,3 +1,7 @@
## 2.0.3
- Bug fixes
## 2.0.2
- Fixed formatting

View File

@ -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,
@ -581,15 +589,18 @@ class JishoWordSense {
.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)
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(),
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>);
restrictions: (json['restrictions'] as List)
.map((result) => result as String)
.toList(),
);
}
// ignore: public_member_api_docs

View File

@ -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/