test: fix test.

Signed-off-by: xsahil03x <[email protected]>
This commit is contained in:
Sahil Kumar
2023-07-28 21:07:02 +05:30
committed by xsahil03x
parent e8de28854b
commit b2171b5572
3 changed files with 5 additions and 4 deletions
@@ -26,8 +26,9 @@ Attachment _$AttachmentFromJson(Map<String, dynamic> json) => Attachment(
authorIcon: json['author_icon'] as String?,
assetUrl: json['asset_url'] as String?,
actions: (json['actions'] as List<dynamic>?)
?.map((e) => Action.fromJson(e as Map<String, dynamic>))
.toList(),
?.map((e) => Action.fromJson(e as Map<String, dynamic>))
.toList() ??
const [],
originalWidth: json['original_width'] as int?,
originalHeight: json['original_height'] as int?,
extraData: json['extra_data'] as Map<String, dynamic>? ?? const {},
+1 -1
View File
@@ -5,7 +5,7 @@
"silent": false,
"attachments": [
{
"type": "video",
"type": "giphy",
"title_link": "https://media.giphy.com/media/5zvN79uTGfLMOVfQaA/giphy.gif",
"title": "The Lion King Disney GIF - Find & Share on GIPHY",
"thumb_url": "https://media.giphy.com/media/5zvN79uTGfLMOVfQaA/giphy.gif",
@@ -38,7 +38,7 @@ void main() {
'https://giphy.com/gifs/the-lion-king-live-action-5zvN79uTGfLMOVfQaA',
attachments: [
Attachment.fromJson(const {
'type': 'video',
'type': 'giphy',
'author_name': 'GIPHY',
'title': 'The Lion King Disney GIF - Find \u0026 Share on GIPHY',
'title_link':