Skip to content

Expose isSentByMe and groupStatus in all messages builders#805

Merged
demchenkoalex merged 1 commit intoflyerhq:mainfrom
nicolasbraun:feat/status_sentby_me_in_builders
Jun 8, 2025
Merged

Expose isSentByMe and groupStatus in all messages builders#805
demchenkoalex merged 1 commit intoflyerhq:mainfrom
nicolasbraun:feat/status_sentby_me_in_builders

Conversation

@nicolasbraun
Copy link
Contributor

Exposing those 2 attributes in the builders, allow for more customization

For example only showing Time/status for the last message of the group

            textMessageBuilder: (
                context,
                message,
                index, {
                required bool isSentByMe,
                MessageGroupStatus? groupStatus,
              }) =>
                  FlyerChatTextMessage(
                message: message,
                index: index,
                showStatus: _shouldDisplayStatus(groupStatus),
                showTime: _shouldDisplayTime(groupStatus),
              ),

Note: I choose not to remove the isSentByMe logic inside the UI package (what would require user to pass it manually in each builder)

image

@demchenkoalex demchenkoalex merged commit 263d145 into flyerhq:main Jun 8, 2025
1 check passed
@nicolasbraun nicolasbraun deleted the feat/status_sentby_me_in_builders branch June 9, 2025 07:36
aljanshere pushed a commit to aljanshere/flutter_chat_ui that referenced this pull request Jun 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants