GetStream / stream-chat-flutter

Flutter Chat SDK - Build your own chat app experience using Dart, Flutter and the Stream Chat Messaging API.
https://getstream.io/chat/sdk/flutter/
Other
880 stars 313 forks source link

fix(ui): custom attachment builders #1938

Closed deven98 closed 2 weeks ago

deven98 commented 2 weeks ago

PR based on #1826

The attachment builder now expects custom attachments only and adds the attachment builders for the normal attachment types by default.

Old:

messageWidget.copyWith(
  // ....
  attachmentBuilders: [
    CustomBuilder()
    ...StreamAttachmentWidgetBuilder.defaultBuilders(message: messageDetails.message),
  ],
);

New:

messageWidget.copyWith(
  // ....
  attachmentBuilders: [
    CustomBuilder()
  ],
);

OR

messageWidget.copyWith(
  // ....
  attachmentBuilders: [
    ...StreamAttachmentWidgetBuilder.defaultBuilders(
      message: messageDetails.message,
        customAttachmentBuilders: [
           CustomBuilder(),
        ],
     ),
  ],
);
codecov[bot] commented 2 weeks ago

Codecov Report

Attention: Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.

Project coverage is 60.28%. Comparing base (5ea210e) to head (e851030).

Files Patch % Lines
...tter/lib/src/message_widget/parse_attachments.dart 0.00% 2 Missing :warning:
.../attachment/builder/attachment_widget_builder.dart 0.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1938 +/- ## ========================================== - Coverage 60.28% 60.28% -0.01% ========================================== Files 317 317 Lines 18478 18479 +1 ========================================== Hits 11140 11140 - Misses 7338 7339 +1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.