Skip to content

Commit

Permalink
feat: 919 - new field KnowledgePanelImageElement.link_url
Browse files Browse the repository at this point in the history
Impacted files:
* `knowledge_panel_element.dart`: added the `'link_url'` field; fixed the tag for `'alt'` field
* `knowledge_panel_element.g.dart`: generated
* `user.g.dart`: generated - I guess the latest changes in `user.dart` were not followed by `dart run build_runner build`
  • Loading branch information
monsieurtanuki committed May 3, 2024
1 parent 943bd2d commit 319d971
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
8 changes: 6 additions & 2 deletions lib/src/model/knowledge_panel_element.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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<String, dynamic> json) =>
_$KnowledgePanelImageElementFromJson(json);
Expand Down
6 changes: 4 additions & 2 deletions lib/src/model/knowledge_panel_element.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions lib/src/model/user.g.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 319d971

Please sign in to comment.