Skip to content

Commit

Permalink
fix!: 🐛 Message copyWith id value fix (#202)
Browse files Browse the repository at this point in the history
  • Loading branch information
aditya-css authored Jun 24, 2024
1 parent 95dc5eb commit b33bcf8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
## [2.0.0] (Unreleased)

* **Breaking**: [202](https://github.com/SimformSolutionsPvtLtd/flutter_chatview/pull/202)
Message copyWith id value fix.
* **Breaking**: [173](https://github.com/SimformSolutionsPvtLtd/flutter_chatview/pull/173) Added
callback to sort message in chat.
* **Breaking**: [178](https://github.com/SimformSolutionsPvtLtd/flutter_chatview/pull/178) Fixed
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ visit [Chat View Example](https://chat-view-8f1b5.web.app/#/).

- Moved `currentUser` field from `ChatView` widget to `ChatController` class

- Updated `id` value in `copyWith` method of `Message` to have correct value.

- Removed `showTypingIndicator` field from `ChatView` and replaced it with `ChatController.showTypingIndicator`.

Before:
Expand Down
2 changes: 1 addition & 1 deletion lib/src/models/message.dart
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ class Message {
bool forceNullValue = false,
}) {
return Message(
id: id ?? this.message,
id: id ?? this.id,
message: message ?? this.message,
createdAt: createdAt ?? this.createdAt,
sentBy: sentBy ?? this.sentBy,
Expand Down

0 comments on commit b33bcf8

Please sign in to comment.