-
Notifications
You must be signed in to change notification settings - Fork 208
feat: ✨ Implement chat list UI components including app bar, controll… #350
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
186d6de to
5a704d2
Compare
…er, and example page
5a704d2 to
c9da40e
Compare
|
|
||
| controller = ChatViewListController( | ||
| initialUsersList: initialUsersList, | ||
| scrollController: ScrollController(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use PrimaryScrollController.of(context) instead.
| this.searchConfig, | ||
| this.separatorWidget, | ||
| this.padding, | ||
| this.chatViewListTileConfig, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please drop the prefix since that's implied by the class name.
| /// Creates a configuration object for the chat list UI. | ||
| const ChatViewListConfig({ | ||
| this.searchConfig, | ||
| this.separatorWidget, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can drop the suffix here.
| }); | ||
|
|
||
| /// Configuration for the search text field in the chat list. | ||
| final SearchConfig? searchConfig; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please add ChatView prefix to the model's class name?
| final double? extraSpaceAtLast; | ||
|
|
||
| /// Configuration for the load more chat list widget. | ||
| final LoadMoreChatListConfig? loadMoreChatListConfig; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
loadMoreConfig would work I believe.
| }); | ||
|
|
||
| /// Configuration for the profile widget. | ||
| final ChatViewListTileConfig? chatViewListTileConfig; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use a separate isolated config for this widget.
| children: [ | ||
| CircleAvatar( | ||
| radius: chatViewListTileConfig?.circleAvatarRadius, | ||
| backgroundImage: user.imageUrl == null || user.imageUrl!.isEmpty |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please cache user.imageUrl in a local variable for better null handling.
lib/src/widgets/chat_view_list.dart
Outdated
| super.key, | ||
| this.config, | ||
| required this.controller, | ||
| this.profileWidget, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can drop the widget suffix.
lib/src/widgets/chat_view_list.dart
Outdated
| const EdgeInsets.symmetric(vertical: 16.0), | ||
| child: Center( | ||
| child: widget.loadMoreChatWidget ?? | ||
| CircularProgressIndicator( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use adaptive version.
| return SliverAppBar( | ||
| surfaceTintColor: surfaceTintColor, | ||
| scrolledUnderElevation: scrolledUnderElevation, | ||
| title: Text( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please provide maxLine and overflow properties here.
798cc9b to
7aacc3e
Compare
7aacc3e to
7663d88
Compare
…er, and example page
7663d88 to
14110fb
Compare
…er, and example page
Description
Checklist
fix:,feat:,docs:etc).docsand added dartdoc comments with///.examplesordocs.Breaking Change?
Related Issues