diff --git a/lib/src/model/knowledge_panel_element.dart b/lib/src/model/knowledge_panel_element.dart index a387cfc1d7..e52fa86d3e 100644 --- a/lib/src/model/knowledge_panel_element.dart +++ b/lib/src/model/knowledge_panel_element.dart @@ -95,11 +95,15 @@ class KnowledgePanelImageElement extends JsonObject { final int? height; /// Alt Text of the image. - @JsonKey(name: 'alt_text') + @JsonKey(name: 'alt') final String? altText; + /// URL, for clickable image. + @JsonKey(name: 'link_url') + final String? linkUrl; + const KnowledgePanelImageElement( - {required this.url, this.width, this.height, this.altText}); + {required this.url, this.width, this.height, this.altText, this.linkUrl}); factory KnowledgePanelImageElement.fromJson(Map json) => _$KnowledgePanelImageElementFromJson(json); diff --git a/lib/src/model/knowledge_panel_element.g.dart b/lib/src/model/knowledge_panel_element.g.dart index c27254bf98..6e07b94b5d 100644 --- a/lib/src/model/knowledge_panel_element.g.dart +++ b/lib/src/model/knowledge_panel_element.g.dart @@ -43,7 +43,8 @@ KnowledgePanelImageElement _$KnowledgePanelImageElementFromJson( url: json['url'] as String, width: json['width'] as int?, height: json['height'] as int?, - altText: json['alt_text'] as String?, + altText: json['alt'] as String?, + linkUrl: json['link_url'] as String?, ); Map _$KnowledgePanelImageElementToJson( @@ -52,7 +53,8 @@ Map _$KnowledgePanelImageElementToJson( 'url': instance.url, 'width': instance.width, 'height': instance.height, - 'alt_text': instance.altText, + 'alt': instance.altText, + 'link_url': instance.linkUrl, }; KnowledgePanelPanelGroupElement _$KnowledgePanelPanelGroupElementFromJson( diff --git a/lib/src/model/user.g.dart b/lib/src/model/user.g.dart index 6e1835f99d..66d7aa8014 100644 --- a/lib/src/model/user.g.dart +++ b/lib/src/model/user.g.dart @@ -10,6 +10,7 @@ User _$UserFromJson(Map json) => User( comment: json['comment'] as String?, userId: json['user_id'] as String, password: json['password'] as String, + cookie: json['cookie'] as String?, ); Map _$UserToJson(User instance) { @@ -24,5 +25,6 @@ Map _$UserToJson(User instance) { writeNotNull('comment', instance.comment); val['user_id'] = instance.userId; val['password'] = instance.password; + val['cookie'] = instance.cookie; return val; }