Migrated guides in the docs to v4

This commit is contained in:
Ayush Shekhar
2022-04-28 16:03:13 +05:30
parent ec6ac99f36
commit 1fedb3005c
6 changed files with 65 additions and 65 deletions
@@ -38,10 +38,10 @@ Additionally, pinning a message requires you to add the roles which are allowed
### Partially remove some message actions
For example, if you only want to keep "copy message" and "delete message",
here is how to do it using the `messageBuilder` with our `MessageWidget`.
here is how to do it using the `messageBuilder` with our `StreamMessageWidget`.
```dart
MessageListView(
StreamMessageListView(
messageBuilder: (context, details, messages, defaultMessage) {
return defaultMessage.copyWith(
showFlagButton: false,
@@ -61,14 +61,14 @@ The SDK also allows you to add new actions into the dialog.
For example, let's suppose you want to introduce a new message action - "Demo Action":
We use the `customActions` parameter of the `MessageWidget` to add extra actions.
We use the `customActions` parameter of the `StreamMessageWidget` to add extra actions.
```dart
MessageListView(
StreamMessageListView(
messageBuilder: (context, details, messages, defaultMessage) {
return defaultMessage.copyWith(
customActions: [
MessageAction(
StreamMessageAction(
leading: Icon(Icons.add),
title: Text('Demo Action'),
onTap: (message) {