SBUCustomParamsHandler class abstract
A handler that lets you customize message params right before they are sent or updated.
This is the Flutter UIKit counterpart of Android UIKit's CustomParamsHandler
and iOS UIKit's SBUGlobalCustomParams.
Register an instance with SendbirdUIKit.setCustomParamsHandler. Each callback is invoked once, right before the corresponding Sendbird Chat SDK send or update call, and receives the params object so you can mutate it in place. For example, to trim leading and trailing whitespace from an outgoing user message:
class MyCustomParamsHandler extends SBUCustomParamsHandler {
@override
void onBeforeSendUserMessage(UserMessageCreateParams params) {
params.message = params.message.trim();
}
}
SendbirdUIKit.setCustomParamsHandler(MyCustomParamsHandler());
All methods have empty default implementations, so you only need to override the ones you want to customize.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onBeforeSendFileMessage(
FileMessageCreateParams params) → void - Called before sending a file message.
-
onBeforeSendMultipleFilesMessage(
MultipleFilesMessageCreateParams params) → void - Called before sending a multiple files message.
-
onBeforeSendUserMessage(
UserMessageCreateParams params) → void - Called before sending a user message.
-
onBeforeUpdateUserMessage(
UserMessageUpdateParams params) → void - Called before updating (editing) a user message.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited