Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to render Custom Attachment Type #29

Closed
nosmirck opened this issue Apr 15, 2020 · 1 comment
Closed

Ability to render Custom Attachment Type #29

nosmirck opened this issue Apr 15, 2020 · 1 comment
Labels
enhancement New feature or request

Comments

@nosmirck
Copy link
Contributor

The api provides a way to send a custom payload through attachments and we can have a MessageBuilder that easily handles this scenario:

MessageListView(
  showVideoFullScreen: true,
  messageBuilder:_buildCustomMessage,
  showOtherMessageUsername: true,
  threadBuilder: (_, parentMessage) {
  return ThreadPage(
  parent: parentMessage,
  );
  },
),

and in _buildCustom Message logic for it can be done, however, it would basically requiere to re-write the MessageWidget with all its features + a small set of builders for the attachments.

Proposed Solution:

Add a list of AttachmentBuilders to the MessageListView that can be passed down to the MessageWidget and it can be used during _buildBubble

@imtoori imtoori added the enhancement New feature or request label Apr 15, 2020
@imtoori
Copy link
Contributor

imtoori commented Apr 24, 2020

In the alpha version the MessageListView has a property Map<String, AttachmentBuilder> attachmentBuilders.
The key is the type of the attachment and the value is the builder.
It defaults to the regular attachment builders

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants