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
+
1
9
## [ 1.3.0]
2
10
3
11
* ** 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> {
79
79
chatController: _chatController,
80
80
onSendTap: _onSendTap,
81
81
featureActiveConfig: const FeatureActiveConfig (
82
- lastSeenAgoBuilderVisibility: true ,
83
- receiptsBuilderVisibility: true ),
82
+ lastSeenAgoBuilderVisibility: true ,
83
+ receiptsBuilderVisibility: true ,
84
+ ),
84
85
chatViewState: ChatViewState .hasMessages,
85
86
chatViewStateConfig: ChatViewStateConfiguration (
86
87
loadingWidgetConfig: ChatViewStateWidgetConfiguration (
Original file line number Diff line number Diff line change @@ -121,7 +121,8 @@ class ChatController {
121
121
122
122
/// Function for loading data while pagination.
123
123
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);
125
126
messageStreamController.sink.add (initialMessageList);
126
127
}
127
128
Original file line number Diff line number Diff line change @@ -114,7 +114,7 @@ class ChatListWidget extends StatefulWidget {
114
114
115
115
class _ChatListWidgetState extends State <ChatListWidget >
116
116
with SingleTickerProviderStateMixin {
117
- final ValueNotifier <bool > _isNextPageLoading = ValueNotifier (false );
117
+ final ValueNotifier <bool > _isNextPageLoading = ValueNotifier < bool > (false );
118
118
ValueNotifier <bool > showPopUp = ValueNotifier (false );
119
119
final GlobalKey <ReactionPopupState > _reactionPopupKey = GlobalKey ();
120
120
@@ -241,7 +241,7 @@ class _ChatListWidgetState extends State<ChatListWidget>
241
241
void _pagination () {
242
242
if (widget.loadMoreData == null || widget.isLastPage == true ) return ;
243
243
if ((scrollController.position.pixels ==
244
- scrollController.position.minScrollExtent ) &&
244
+ scrollController.position.maxScrollExtent ) &&
245
245
! _isNextPageLoading.value) {
246
246
_isNextPageLoading.value = true ;
247
247
widget.loadMoreData !()
You can’t perform that action at this time.
0 commit comments