I am using mesibo_flutter_sdk 2.2.0 for chats, but there is no option to hide the user list icon. Please find attached the screenshot below.
I checked MesiboUIOptions, but there is no option available to hide the user list icon.
Code:
void initMesibo(String token) async {
// Future<String> asyncAppId = _mesibo.getAppIdForAccessToken();
// asyncAppId.then((String appid) { mAppId = appid; });
_mesibo.setAccessToken(token);
_mesibo.setListener(this);
_mesibo.start();
_mesiboUi.getUiDefaults().then((MesiboUIOptions options) {
options.enableBackButton = true;
options.appName = "Chats";
options.userOnlineIndicationTitle="Online";
options.toolbarColor = 0xFF73ad00;
options.statusBarColor = 0xFF73ad00;
_mesiboUi.setUiDefaults(options);
});
MesiboUIButtons buttons = MesiboUIButtons();
buttons.message = false;
buttons.audioCall = true;
buttons.videoCall = true;
buttons.groupAudioCall = true;
buttons.groupVideoCall = true;
buttons.endToEndEncryptionInfo = false; // e2ee should be enabled
_mesiboUi.setupBasicCustomization(buttons, null);
}
2
Answers
The best way to customize buttons in a Mesibo UI is by defining a UI listener in native code, as explained in the Mesibo documentation here:
https://docs.mesibo.com/ui-modules/customizing/
For Flutter, basic button customization can be done by setting properties on the MesiboUIButtons object, set
buttons.message = false
:Refer to this Flutter sample code for an implementation:
https://github.com/mesibo/samples/blob/master/flutter/firstapp/lib/main.dart#L270
if the solution proposed to Meisbo itself does not work for you for some reason i’m proposing another one:
We can create a custom layout for your chat interface instead of using the built-in Mesibo UI:
Here
messages
is a list of strings representing the messages in the chat, andmessageController
is aTextEditingController
for the text field where the user types their message. When the send button is pressed, you would handle sending the message and updating themessages
list accordingly.This is a starting point you will need to add some features such as displaying the sender of each message or handling media attachments.
this approach requires a lot of labor and you have to manully manage all aspect of the chat interface