flyer_chat_custom_message 0.0.13 copy "flyer_chat_custom_message: ^0.0.13" to clipboard
flyer_chat_custom_message: ^0.0.13 copied to clipboard

Custom message package for Flutter chat apps, complementing flutter_chat_ui. #chat #ui

Flyer Chat 💬 Custom Message (Placeholder) #

Pub Version Stars melos

Note: This package has no implementation and serves as a placeholder to showcase the pattern for handling custom message types within Flyer Chat.

Implementing Custom Messages #

To render your own custom messages:

  1. When creating a message instance that represents your custom data, use the custom message type provided by flutter_chat_core. This type includes standard fields like id, authorId, createdAt, etc.
  2. Store your custom data within the metadata field (a Map<String, dynamic>) of the custom message. For simple cases, this might be all you need. If you intend to support several distinct types of custom messages, you could use this metadata to help your customMessageBuilder decide which widget to display, for example, by including a specific key like 'customType': 'poll'.
  3. Use the customMessageBuilder provided by the main flutter_chat_ui package's Builders to render your widget based on the message instance passed to the builder.
import 'package:flutter_chat_ui/flutter_chat_ui.dart';

Chat(
  builders: Builders(
    customMessageBuilder: (context, message, index, {
      required bool isSentByMe,
      MessageGroupStatus? groupStatus,
    }) =>
      const SizedBox.shrink(),
  ),
);
0
likes
140
points
27
downloads

Publisher

verified publisherflyer.chat

Weekly Downloads

Custom message package for Flutter chat apps, complementing flutter_chat_ui. #chat #ui

Homepage
Repository (GitHub)
View/report issues
Contributing

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on flyer_chat_custom_message