@@ -26,8 +26,9 @@ Attachment _$AttachmentFromJson(Map<String, dynamic> json) => Attachment(
|
|||||||
authorIcon: json['author_icon'] as String?,
|
authorIcon: json['author_icon'] as String?,
|
||||||
assetUrl: json['asset_url'] as String?,
|
assetUrl: json['asset_url'] as String?,
|
||||||
actions: (json['actions'] as List<dynamic>?)
|
actions: (json['actions'] as List<dynamic>?)
|
||||||
?.map((e) => Action.fromJson(e as Map<String, dynamic>))
|
?.map((e) => Action.fromJson(e as Map<String, dynamic>))
|
||||||
.toList(),
|
.toList() ??
|
||||||
|
const [],
|
||||||
originalWidth: json['original_width'] as int?,
|
originalWidth: json['original_width'] as int?,
|
||||||
originalHeight: json['original_height'] as int?,
|
originalHeight: json['original_height'] as int?,
|
||||||
extraData: json['extra_data'] as Map<String, dynamic>? ?? const {},
|
extraData: json['extra_data'] as Map<String, dynamic>? ?? const {},
|
||||||
|
|||||||
+1
-1
@@ -5,7 +5,7 @@
|
|||||||
"silent": false,
|
"silent": false,
|
||||||
"attachments": [
|
"attachments": [
|
||||||
{
|
{
|
||||||
"type": "video",
|
"type": "giphy",
|
||||||
"title_link": "https://media.giphy.com/media/5zvN79uTGfLMOVfQaA/giphy.gif",
|
"title_link": "https://media.giphy.com/media/5zvN79uTGfLMOVfQaA/giphy.gif",
|
||||||
"title": "The Lion King Disney GIF - Find & Share on GIPHY",
|
"title": "The Lion King Disney GIF - Find & Share on GIPHY",
|
||||||
"thumb_url": "https://media.giphy.com/media/5zvN79uTGfLMOVfQaA/giphy.gif",
|
"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',
|
'https://giphy.com/gifs/the-lion-king-live-action-5zvN79uTGfLMOVfQaA',
|
||||||
attachments: [
|
attachments: [
|
||||||
Attachment.fromJson(const {
|
Attachment.fromJson(const {
|
||||||
'type': 'video',
|
'type': 'giphy',
|
||||||
'author_name': 'GIPHY',
|
'author_name': 'GIPHY',
|
||||||
'title': 'The Lion King Disney GIF - Find \u0026 Share on GIPHY',
|
'title': 'The Lion King Disney GIF - Find \u0026 Share on GIPHY',
|
||||||
'title_link':
|
'title_link':
|
||||||
|
|||||||
Reference in New Issue
Block a user