Skip to content

Commit

Permalink
Merge pull request #217 from takenet/feature/532658-get-answer-content
Browse files Browse the repository at this point in the history
Feature/532658 get answer content
  • Loading branch information
RaulRodrigo06 authored Oct 10, 2023
2 parents 1109bee + 833b379 commit 07db02a
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/src/utils/ds_message_content_type.util.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ abstract class DSMessageContentType {
static const String input = 'application/vnd.lime.input+json';
static const String location = 'application/vnd.lime.location+json';
static const String applicationJson = 'application/json';
static const String reply = 'application/vnd.lime.reply+json';
}
19 changes: 18 additions & 1 deletion lib/src/widgets/utils/ds_card.widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,21 @@ class DSCard extends StatelessWidget {
case DSMessageContentType.contact:
return _buildContact();

case DSMessageContentType.reply:
return DSCard(
type: content['replied']['type'],
content: content['replied']['value'],
align: align,
borderRadius: borderRadius,
status: status,
onSelected: onSelected,
avatarConfig: avatarConfig,
style: style,
onOpenLink: onOpenLink,
messageId: messageId,
customer: customer,
);

case DSMessageContentType.mediaLink:
return _buildMediaLink();

Expand Down Expand Up @@ -219,7 +234,9 @@ class DSCard extends StatelessWidget {
}

Widget _buildMediaLink() {
final media = DSMediaLink.fromJson(content);
final media = DSMediaLink.fromJson(
content,
);
final size = media.size ?? 0;

final shouldAuthenticate =
Expand Down

0 comments on commit 07db02a

Please sign in to comment.