Skip to content

Conversation

@diegonuja
Copy link
Contributor

@diegonuja diegonuja commented Oct 29, 2025

Hello,

I'd like to add 2 new builders to the flyer_chat widgets to customize the status icons. The idea behind this is to be able to both change the icons of the message status and to show that a message has been edited next to the icon (like Whatsapp does)

Summary

  • Introduces statusBuilder and timeBuilder to all Flyer Chat message widgets.
  • Enables full control over the UI and timestamp rendering without forking components.
  • Maintains default behavior when builders aren’t provided.

What’s Changed

  • Adds optional statusBuilder to render custom delivery status.
  • Adds optional timeBuilder to customize timestamp display using provided DateTime .

Here is a quick example on how to use it.

class CustomStatus extends StatelessWidget {
  const CustomStatus({super.key, this.status});

  final MessageStatus? status;

  @override
  Widget build(BuildContext context) {
    return Text('Custom');
  }
}

// ...

return Chat(
  builders: Builders(
    textMessageBuilder: (context, message, index, {required bool isSentByMe, MessageGroupStatus? groupStatus}) {
      return FlyerChatTextMessage(
        message: message,
        index: index,
        statusBuilder: (context, status) => CustomStatus(status: message.status),
      );
    },
  ),
);
Screenshot 2025-10-29 at 14 19 47

Usage Notes

  • Both builders are optional; defaults remain unchanged.
  • timeBuilder receives the message time for custom formatting or localization.

Backward Compatibility

  • No breaking changes; existing UIs continue to render as before.
  • Builder callbacks only override specific sections when provided.

I hope this isn't out of scope and could be added to this awesome package. Let me know if you need anything changed.

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