Skip to content

Commit

Permalink
Update advanced-usage.md (#527)
Browse files Browse the repository at this point in the history
Decided to add highlight documentation (it was not obvious for me co configure that)
  • Loading branch information
antonderevyanko authored Nov 21, 2023
1 parent 867ee2d commit 9516174
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions doc/advanced-usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -598,4 +598,17 @@ if (_messages.where((e) => e.id == 'lastReadMessageId').isEmpty) {
_chatKey.currentState?.scrollToUnreadHeader();
});
}
```

### Hightlight message on scroll

In order to hightlight message on scrolling you need to setup `highlightMessageColor` for ChatTheme used. Then you can call scroll to message function like this:

```dart
scrollToMessage(
'messageId',
withHighlight: true,
// Default duration is 3 seconds
highlightDuration: const Duration(milliseconds: 1000),
);
```

0 comments on commit 9516174

Please sign in to comment.