chat/utils/typedefs library

Typedefs

MessageAnimationDurationResolver = Duration? Function(Message message)
Signature for a function that resolves the animation duration for a specific message. Used for customizing insert/remove animations in the chat list.
OnAttachmentTapCallback = VoidCallback
Callback signature for when the attachment button in the composer is tapped.
OnMessageLongPressCallback = void Function(Message message, {LongPressStartDetails details, int index})
Callback signature for when a message is long-pressed. Provides the long-pressed message, its index, and LongPressStartDetails.
OnMessageSendCallback = void Function(String text)
Callback signature for when the user attempts to send a message. Provides the text entered by the user.
OnMessageTapCallback = void Function(Message message, {required TapUpDetails details, required int index})
Callback signature for when a message is tapped. Provides the tapped message, its index, and TapUpDetails.
PaginationCallback = Future<void> Function()
Callback signature for requesting pagination (loading more messages). Should return a Future that completes when the loading is finished.