File tree Expand file tree Collapse file tree 4 files changed +15
-5
lines changed
Expand file tree Collapse file tree 4 files changed +15
-5
lines changed Original file line number Diff line number Diff line change 1+ ##(Unreleased)
2+
3+ * ** Feat** : [ 105] ( https://github.com/SimformSolutionsPvtLtd/flutter_chatview/pull/105 ) Allow user
4+ to get callback when image is picked so user can perform operation like crop. Allow user to pass
5+ configuration like height, width, image quality and preferredCameraDevice.
6+ * ** Fix** : [ 95] ( https://github.com/SimformSolutionsPvtLtd/flutter_chatview/issues/95 ) Fix issue of
7+ chat is added to bottom while ` loadMoreData ` callback.
8+
19## [ 1.3.0]
210
311* ** Feat** : [ 71] ( https://github.com/SimformSolutionsPvtLtd/flutter_chatview/pull/71 ) Added Callback
Original file line number Diff line number Diff line change @@ -79,8 +79,9 @@ class _ChatScreenState extends State<ChatScreen> {
7979 chatController: _chatController,
8080 onSendTap: _onSendTap,
8181 featureActiveConfig: const FeatureActiveConfig (
82- lastSeenAgoBuilderVisibility: true ,
83- receiptsBuilderVisibility: true ),
82+ lastSeenAgoBuilderVisibility: true ,
83+ receiptsBuilderVisibility: true ,
84+ ),
8485 chatViewState: ChatViewState .hasMessages,
8586 chatViewStateConfig: ChatViewStateConfiguration (
8687 loadingWidgetConfig: ChatViewStateWidgetConfiguration (
Original file line number Diff line number Diff line change @@ -121,7 +121,8 @@ class ChatController {
121121
122122 /// Function for loading data while pagination.
123123 void loadMoreData (List <Message > messageList) {
124- initialMessageList.addAll (messageList);
124+ /// Here, we have passed 0 index as we need to add data before first data
125+ initialMessageList.insertAll (0 , messageList);
125126 messageStreamController.sink.add (initialMessageList);
126127 }
127128
Original file line number Diff line number Diff line change @@ -114,7 +114,7 @@ class ChatListWidget extends StatefulWidget {
114114
115115class _ChatListWidgetState extends State <ChatListWidget >
116116 with SingleTickerProviderStateMixin {
117- final ValueNotifier <bool > _isNextPageLoading = ValueNotifier (false );
117+ final ValueNotifier <bool > _isNextPageLoading = ValueNotifier < bool > (false );
118118 ValueNotifier <bool > showPopUp = ValueNotifier (false );
119119 final GlobalKey <ReactionPopupState > _reactionPopupKey = GlobalKey ();
120120
@@ -241,7 +241,7 @@ class _ChatListWidgetState extends State<ChatListWidget>
241241 void _pagination () {
242242 if (widget.loadMoreData == null || widget.isLastPage == true ) return ;
243243 if ((scrollController.position.pixels ==
244- scrollController.position.minScrollExtent ) &&
244+ scrollController.position.maxScrollExtent ) &&
245245 ! _isNextPageLoading.value) {
246246 _isNextPageLoading.value = true ;
247247 widget.loadMoreData !()
You can’t perform that action at this time.
0 commit comments