-
Notifications
You must be signed in to change notification settings - Fork 158
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
1,442 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
## Main Contributors | ||
|
||
<table> | ||
<tr> | ||
<td align="center"><a href="https://github.com/vatsaltanna"><img src="https://avatars.githubusercontent.com/u/25323183?s=100" width="100px;" alt=""/><br /><sub><b>Vatsal Tanna</b></sub></a></td> | ||
<td align="center"><a href="https://github.com/DhvanitVaghani"><img src="https://avatars.githubusercontent.com/u/64645989?v=4" width="100px;" alt=""/><br /><sub><b>Dhvanit Vaghani</b></sub></a></td> | ||
<td align="center"><a href="https://github.com/Ujas-Majithiya"><img src="https://avatars.githubusercontent.com/u/56400956?v=4" width="100px;" alt=""/><br /><sub><b>Ujas Majithiya</b></sub></a></td> | ||
<td align="center"><a href="https://github.com/apurva780"><img src="https://avatars.githubusercontent.com/u/65003381?v=4" width="100px;" alt=""/><br /><sub><b>Apurva Kanthraviya</b></sub></a></td> | ||
<td align="center"><a href="https://github.com/aditya-chavda"><img src="https://avatars.githubusercontent.com/u/41247722?v=4" width="100px;" alt=""/><br /><sub><b>Aditya Chavda</b></sub></a></td> | ||
</tr> | ||
</table> | ||
<br/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
## How to use | ||
|
||
Check out [blog](https://medium.com/simform-engineering/chatview-a-cutting-edge-chat-ui-solution-7367b1f9d772) for better understanding and basic implementation. | ||
|
||
Also, for whole example, check out the **example** app in the [example](https://github.com/SimformSolutionsPvtLtd/flutter_chatview/tree/main/example) directory or the 'Example' tab on pub.dartlang.org for a more complete example. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
1. Add dependencies to `pubspec.yaml` | ||
|
||
Get the latest version in the 'Installing' tab | ||
on [pub.dev](https://pub.dev/packages/chatview/install) | ||
|
||
```yaml | ||
dependencies: | ||
chatview: <latest-version> | ||
``` | ||
2. Run pub get. | ||
```shell | ||
flutter pub get | ||
``` | ||
|
||
3. Import package. | ||
|
||
```dart | ||
import 'package:chatview/chatview.dart'; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,171 @@ | ||
## Migration guide for release 2.0.0 | ||
|
||
- Renamed `sendBy` field to `sentBy` in `Message` class. | ||
|
||
- Renamed `chatUsers` field to `otherUsers` in `ChatController` class. | ||
|
||
- 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: | ||
```dart | ||
ChatView( | ||
showTypingIndicator:false, | ||
), | ||
``` | ||
After: | ||
```dart | ||
/// use it with your [ChatController] instance. | ||
_chatContoller.setTypingIndicator = true; // for showing indicator | ||
_chatContoller.setTypingIndicator = false; // for hiding indicator | ||
``` | ||
- Updated `ChatUser`, `Message` and `ReplyMessage` Data Model's `fromJson` and `toJson` methods: | ||
##### in `ChatUser.fromJson`: | ||
Before: | ||
```dart | ||
ChatUser.fromJson( | ||
{ | ||
... | ||
'imageType': ImageType.asset, | ||
... | ||
}, | ||
), | ||
``` | ||
After: | ||
```dart | ||
ChatUser.fromJson( | ||
{ | ||
... | ||
'imageType': 'asset', | ||
... | ||
}, | ||
), | ||
``` | ||
##### in `ChatUser.toJson`: | ||
Before: | ||
```dart | ||
{ | ||
... | ||
imageType: ImageType.asset, | ||
... | ||
} | ||
``` | ||
After: | ||
```dart | ||
{ | ||
... | ||
imageType: asset, | ||
... | ||
} | ||
``` | ||
##### in `Message.fromJson`: | ||
Before: | ||
```dart | ||
Message.fromJson( | ||
{ | ||
... | ||
'createdAt': DateTime.now(), | ||
'message_type': MessageType.text, | ||
'voice_message_duration': Duration(seconds: 5), | ||
... | ||
} | ||
) | ||
``` | ||
After: | ||
```dart | ||
Message.fromJson( | ||
{ | ||
... | ||
'createdAt': '2024-06-13T17:32:19.586412', | ||
'message_type': 'text', | ||
'voice_message_duration': '5000000', | ||
... | ||
} | ||
) | ||
``` | ||
##### in `Message.toJson`: | ||
Before: | ||
```dart | ||
{ | ||
... | ||
createdAt: 2024-06-13 17:23:19.454789, | ||
message_type: MessageType.text, | ||
voice_message_duration: 0:00:05.000000, | ||
... | ||
} | ||
``` | ||
After: | ||
```dart | ||
{ | ||
... | ||
createdAt: 2024-06-13T17:32:19.586412, | ||
message_type: text, | ||
voice_message_duration: 5000000, | ||
... | ||
} | ||
``` | ||
##### in `ReplyMessage.fromJson`: | ||
Before: | ||
```dart | ||
ReplyMessage.fromJson( | ||
{ | ||
... | ||
'message_type': MessageType.text, | ||
'voiceMessageDuration': Duration(seconds: 5), | ||
... | ||
} | ||
) | ||
``` | ||
After: | ||
```dart | ||
ReplyMessage.fromJson( | ||
{ | ||
... | ||
'message_type': 'text', | ||
'voiceMessageDuration': '5000000', | ||
... | ||
} | ||
) | ||
``` | ||
in `ReplyMessage.toJson`: | ||
Before: | ||
```dart | ||
{ | ||
... | ||
message_type: MessageType.text, | ||
voiceMessageDuration: 0:00:05.000000, | ||
... | ||
} | ||
``` | ||
After: | ||
```dart | ||
{ | ||
... | ||
message_type: text, | ||
voiceMessageDuration: 5000000, | ||
... | ||
} | ||
``` |
Oops, something went wrong.