WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* **Breaking**: [330](https://github.com/SimformSolutionsPvtLtd/chatview/issues/330)
Optimized memory usage in chat message handling for smoother performance.
* **Feat**: [386](https://github.com/SimformSolutionsPvtLtd/chatview/pull/386) Introduced
`ChatViewList` to provide a support for listing chats with options like search, pagination, online
`ChatList` to provide a support for listing chats with options like search, pagination, online
status, unread message count, typing indicator, long press menu and more.
* **Feat**: [356](https://github.com/SimformSolutionsPvtLtd/chatview/pull/356) Add
`loadOldReplyMessage` property to `RepliedMessageConfiguration` callback to load the original
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
ChatView is a Flutter package that allows you to integrate a highly customizable chat UI in your
Flutter applications with [Flexible Backend Integration][chatViewConnect].

| ChatViewList | ChatView |
|--------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------|
| ![ChatViewList_Preview](https://raw.githubusercontent.com/SimformSolutionsPvtLtd/chatview/main/preview/chatviewlist.gif) | ![ChatView Preview](https://raw.githubusercontent.com/SimformSolutionsPvtLtd/chatview/main/preview/chatview.gif) |
| ChatList | ChatView |
|------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------|
| ![ChatList_Preview](https://raw.githubusercontent.com/SimformSolutionsPvtLtd/chatview/main/preview/chatlist.gif) | ![ChatView Preview](https://raw.githubusercontent.com/SimformSolutionsPvtLtd/chatview/main/preview/chatview.gif) |

## Features

### ChatViewList:
### ChatList:

- Smooth animations for adding, removing, and pinning chats
- Pagination support for large chat histories
Expand Down
66 changes: 33 additions & 33 deletions doc/documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ Flutter applications with [Flexible Backend Integration](https://pub.dev/package

## Preview

| ChatViewList | ChatView |
|--------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------|
| ![ChatViewList_Preview](https://raw.githubusercontent.com/SimformSolutionsPvtLtd/chatview/main/preview/chatviewlist.gif) | ![ChatView Preview](https://raw.githubusercontent.com/SimformSolutionsPvtLtd/chatview/main/preview/chatview.gif) |
| ChatList | ChatView |
|------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------|
| ![ChatList_Preview](https://raw.githubusercontent.com/SimformSolutionsPvtLtd/chatview/main/preview/chatlist.gif) | ![ChatView Preview](https://raw.githubusercontent.com/SimformSolutionsPvtLtd/chatview/main/preview/chatview.gif) |

## Features

### ChatViewList:
### ChatList:

- Smooth animations for adding, removing, and pinning chats
- Pagination support for large chat histories
Expand Down Expand Up @@ -120,26 +120,26 @@ minSdkVersion 21
<uses-permission android:name="android.permission.RECORD_AUDIO"/>
```

# ChatViewList - Basic Usage
# ChatList - Basic Usage

Here's how to integrate ChatViewList into your Flutter application with minimal setup:
Here's how to integrate ChatList into your Flutter application with minimal setup:

## Step 1: Create a ChatView List Controller
## Step 1: Create a ChatList Controller

```dart
ChatViewListController chatListController = ChatViewListController(
ChatListController chatListController = ChatListController(
initialChatList: chatList,
scrollController: ScrollController(),
);
```

## Step 2: Add the ChatViewList Widget
## Step 2: Add the ChatList Widget

```dart
ChatViewList(
ChatList(
controller: chatListController,
appbar: const ChatViewListAppBar(
title: 'ChatViewList Demo',
appbar: const ChatListAppBar(
title: 'ChatList Demo',
),
menuConfig: ChatMenuConfig(
deleteCallback: (chat) => chatListController.removeChat(chat.id),
Expand Down Expand Up @@ -174,8 +174,8 @@ Define your initial chat list:

```dart

List<ChatViewListItem> chatList = [
ChatViewListItem(
List<ChatListItem> chatList = [
ChatListItem(
id: '2',
name: 'Simform',
unreadCount: 2,
Expand All @@ -191,7 +191,7 @@ List<ChatViewListItem> chatList = [
pinStatus: PinStatus.pinned,
),
),
ChatViewListItem(
ChatListItem(
id: '1',
name: 'Flutter',
userActiveStatus: UserActiveStatus.online,
Expand All @@ -200,17 +200,17 @@ List<ChatViewListItem> chatList = [
];
```

# ChatViewList - Advanced Usage
# ChatList - Advanced Usage

ChatViewList offers extensive customization options to tailor the chat list UI to your specific needs.
ChatList offers extensive customization options to tailor the chat list UI to your specific needs.

## Adding Custom Appbar

```dart
ChatViewList(
ChatList(
// ...
appbar: ChatViewListAppBar(
title: 'ChatViewList Demo',
appbar: ChatListAppBar(
title: 'ChatList Demo',
centerTitle: false,
actions: [
IconButton(
Expand All @@ -228,7 +228,7 @@ ChatViewList(
## Adding Search Functionality

```dart
ChatViewList(
ChatList(
// ...
searchConfig: SearchConfig(
textEditingController: TextEditingController(),
Expand All @@ -254,7 +254,7 @@ ChatViewList(
## Adding Custom Header

```dart
ChatViewList(
ChatList(
/// ...
header: SizedBox(
height: 60,
Expand Down Expand Up @@ -301,7 +301,7 @@ ChatViewList(
## Adding Custom Actions in Menu

```dart
ChatViewList(
ChatList(
// ...
menuConfig: ChatMenuConfig(
actions: (chat) => [
Expand Down Expand Up @@ -349,7 +349,7 @@ ChatViewList(
## Chat Tile Configuration

```dart
ChatViewList(
ChatList(
// ...
tileConfig: ListTileConfig(
// ...
Expand All @@ -375,7 +375,7 @@ ChatViewList(
## Typing Indicator Configuration

```dart
ChatViewList(
ChatList(
// ...
tileConfig: ListTileConfig(
// ...
Expand All @@ -395,7 +395,7 @@ ChatViewList(
## Last Message Time Configuration

```dart
ChatViewList(
ChatList(
// ...
tileConfig: ListTileConfig(
// ...
Expand All @@ -414,7 +414,7 @@ ChatViewList(
## Last Message Status Configuration

```dart
ChatViewList(
ChatList(
// ...
tileConfig: ListTileConfig(
// ...
Expand Down Expand Up @@ -443,7 +443,7 @@ ChatViewList(
## Unread Count Configuration

```dart
ChatViewList(
ChatList(
// ...
tileConfig: ListTileConfig(
// ...
Expand All @@ -460,7 +460,7 @@ ChatViewList(
## User Active Status Configuration

```dart
ChatViewList(
ChatList(
// ...
tileConfig: ListTileConfig(
// ...
Expand All @@ -482,7 +482,7 @@ ChatViewList(
## User Avatar Configuration

```dart
ChatViewList(
ChatList(
// ...
tileConfig: ListTileConfig(
// ...
Expand All @@ -499,10 +499,10 @@ ChatViewList(
)
```

## ChatViewList States Configuration
## ChatList States Configuration

```dart
ChatViewList(
ChatList(
// ...
stateConfig: const ListStateConfig(
noChatsWidgetConfig: ChatViewStateWidgetConfiguration(
Expand All @@ -524,7 +524,7 @@ ChatViewList(
## Load More Chats Configuration

```dart
ChatViewList(
ChatList(
// ...
loadMoreConfig: LoadMoreConfig(
size: 30,
Expand Down
22 changes: 11 additions & 11 deletions example/lib/data.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ class Data {
static const profileImage =
"https://github.com/SimformSolutionsPvtLtd/chatview/blob/main/example/assets/images/simform.png?raw=true";

static List<ChatViewListItem> getChatList() {
static List<ChatListItem> getChatList() {
final now = DateTime.now();
return [
ChatViewListItem(
ChatListItem(
id: '1',
name: 'Weekend',
imageUrl:
Expand All @@ -22,7 +22,7 @@ class Data {
),
settings: const ChatSettings(pinStatus: PinStatus.pinned),
),
ChatViewListItem(
ChatListItem(
id: '2',
name: 'Andrius Schneider',
imageUrl:
Expand All @@ -37,7 +37,7 @@ class Data {
status: MessageStatus.delivered,
),
),
ChatViewListItem(
ChatListItem(
id: '3',
name: 'Anna Payet',
imageUrl:
Expand All @@ -51,7 +51,7 @@ class Data {
status: MessageStatus.undelivered,
),
),
ChatViewListItem(
ChatListItem(
id: '4',
name: 'Family',
unreadCount: 4,
Expand All @@ -66,7 +66,7 @@ class Data {
status: MessageStatus.pending,
),
),
ChatViewListItem(
ChatListItem(
id: '5',
name: 'Maria',
imageUrl:
Expand All @@ -79,7 +79,7 @@ class Data {
status: MessageStatus.read,
),
),
ChatViewListItem(
ChatListItem(
id: '6',
name: 'Lunch club!',
chatRoomType: ChatRoomType.group,
Expand All @@ -94,7 +94,7 @@ class Data {
),
settings: const ChatSettings(muteStatus: MuteStatus.muted),
),
ChatViewListItem(
ChatListItem(
id: '7',
name: "Jasper's market",
imageUrl:
Expand All @@ -108,7 +108,7 @@ class Data {
status: MessageStatus.read,
),
),
ChatViewListItem(
ChatListItem(
id: '8',
name: 'Work',
chatRoomType: ChatRoomType.group,
Expand All @@ -122,7 +122,7 @@ class Data {
status: MessageStatus.read,
),
),
ChatViewListItem(
ChatListItem(
id: '9',
name: 'Evelyn Harper',
imageUrl:
Expand All @@ -135,7 +135,7 @@ class Data {
status: MessageStatus.read,
),
),
ChatViewListItem(
ChatListItem(
id: '10',
name: 'Book club',
chatRoomType: ChatRoomType.group,
Expand Down
4 changes: 2 additions & 2 deletions example/lib/example_two/example_two_chat_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import 'package:flutter_svg/flutter_svg.dart';
import 'package:intl/intl.dart';

import '../data.dart';
import '../values/colors.dart';
import '../values/borders.dart';
import '../values/colors.dart';
import '../values/icons.dart';
import '../values/images.dart';
import '../widgets/custom_chat_bar.dart';
Expand All @@ -15,7 +15,7 @@ import '../widgets/reply_message_tile.dart';
class ExampleTwoChatScreen extends StatefulWidget {
const ExampleTwoChatScreen({required this.chat, super.key});

final ChatViewListItem chat;
final ChatListItem chat;

@override
State<ExampleTwoChatScreen> createState() => _ExampleTwoChatScreenState();
Expand Down
Loading