|  |  |  | @ -58,11 +58,11 @@ class _GroupChatDetailScreenState extends State<GroupChatDetailScreen> { | 
		
	
		
			
				|  |  |  |  |       data.paginationVal = data.paginationVal + 10; | 
		
	
		
			
				|  |  |  |  |       if (params != null) { | 
		
	
		
			
				|  |  |  |  |         data.getGroupChatHistory(params!.groupChatDetails! | 
		
	
		
			
				|  |  |  |  |           // senderUID: AppState().chatDetails!.response!.id!.toInt(), | 
		
	
		
			
				|  |  |  |  |           // receiverUID: params!.groupChatDetails!.groupId!, | 
		
	
		
			
				|  |  |  |  |           // loadMore: true, | 
		
	
		
			
				|  |  |  |  |           // isNewChat: false, | 
		
	
		
			
				|  |  |  |  |         ); | 
		
	
		
			
				|  |  |  |  |             // senderUID: AppState().chatDetails!.response!.id!.toInt(), | 
		
	
		
			
				|  |  |  |  |             // receiverUID: params!.groupChatDetails!.groupId!, | 
		
	
		
			
				|  |  |  |  |             // loadMore: true, | 
		
	
		
			
				|  |  |  |  |             // isNewChat: false, | 
		
	
		
			
				|  |  |  |  |             ); | 
		
	
		
			
				|  |  |  |  |       } | 
		
	
		
			
				|  |  |  |  |     } | 
		
	
		
			
				|  |  |  |  |     await Future.delayed( | 
		
	
	
		
			
				
					|  |  |  | @ -83,13 +83,12 @@ class _GroupChatDetailScreenState extends State<GroupChatDetailScreen> { | 
		
	
		
			
				|  |  |  |  |     data = Provider.of<ChatProviderModel>(context, listen: false); | 
		
	
		
			
				|  |  |  |  |     // callPro = Provider.of<ChatCallProvider>(context, listen: false); | 
		
	
		
			
				|  |  |  |  |     if (params != null) { | 
		
	
		
			
				|  |  |  |  |       data.getGroupChatHistory( | 
		
	
		
			
				|  |  |  |  |           params!.groupChatDetails! | 
		
	
		
			
				|  |  |  |  |         // senderUID: AppState().chatDetails!.response!.id!.toInt(), | 
		
	
		
			
				|  |  |  |  |         // receiverUID: params!.groupChatHistory!.groupId!, | 
		
	
		
			
				|  |  |  |  |         // loadMore: false, | 
		
	
		
			
				|  |  |  |  |         // isNewChat: params!.isNewChat!, | 
		
	
		
			
				|  |  |  |  |       ); | 
		
	
		
			
				|  |  |  |  |       data.getGroupChatHistory(params!.groupChatDetails! | 
		
	
		
			
				|  |  |  |  |           // senderUID: AppState().chatDetails!.response!.id!.toInt(), | 
		
	
		
			
				|  |  |  |  |           // receiverUID: params!.groupChatHistory!.groupId!, | 
		
	
		
			
				|  |  |  |  |           // loadMore: false, | 
		
	
		
			
				|  |  |  |  |           // isNewChat: params!.isNewChat!, | 
		
	
		
			
				|  |  |  |  |           ); | 
		
	
		
			
				|  |  |  |  |       data.initAudio(receiverId: params!.groupChatDetails!.groupId!); | 
		
	
		
			
				|  |  |  |  |     } | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
	
		
			
				
					|  |  |  | @ -99,8 +98,8 @@ class _GroupChatDetailScreenState extends State<GroupChatDetailScreen> { | 
		
	
		
			
				|  |  |  |  |         context, | 
		
	
		
			
				|  |  |  |  |         title: params!.groupChatDetails!.groupName.toString().replaceAll(".", " ").capitalizeFirstofEach, | 
		
	
		
			
				|  |  |  |  |         showHomeButton: false, | 
		
	
		
			
				|  |  |  |  |        // showTyping: true, | 
		
	
		
			
				|  |  |  |  |        // chatUser: params!.groupChatHistory!.groupChatHistoryTargetUserList as ChatUser, | 
		
	
		
			
				|  |  |  |  |         // showTyping: true, | 
		
	
		
			
				|  |  |  |  |         // chatUser: params!.groupChatHistory!.groupChatHistoryTargetUserList as ChatUser, | 
		
	
		
			
				|  |  |  |  |         actions: [ | 
		
	
		
			
				|  |  |  |  |           // SvgPicture.asset("assets/icons/chat/call.svg", width: 21, height: 23).onPress(() { | 
		
	
		
			
				|  |  |  |  |           //   makeCall(callType: "AUDIO"); | 
		
	
	
		
			
				
					|  |  |  | @ -117,224 +116,219 @@ class _GroupChatDetailScreenState extends State<GroupChatDetailScreen> { | 
		
	
		
			
				|  |  |  |  |           builder: (BuildContext context, ChatProviderModel m, Widget? child) { | 
		
	
		
			
				|  |  |  |  |             return (m.isLoading | 
		
	
		
			
				|  |  |  |  |                 ? ChatHomeShimmer( | 
		
	
		
			
				|  |  |  |  |               isDetailedScreen: true, | 
		
	
		
			
				|  |  |  |  |             ) | 
		
	
		
			
				|  |  |  |  |                     isDetailedScreen: true, | 
		
	
		
			
				|  |  |  |  |                   ) | 
		
	
		
			
				|  |  |  |  |                 : Column( | 
		
	
		
			
				|  |  |  |  |               children: <Widget>[ | 
		
	
		
			
				|  |  |  |  |                 SmartRefresher( | 
		
	
		
			
				|  |  |  |  |                   enablePullDown: false, | 
		
	
		
			
				|  |  |  |  |                   enablePullUp: true, | 
		
	
		
			
				|  |  |  |  |                   onLoading: () { | 
		
	
		
			
				|  |  |  |  |                     getMoreChat(); | 
		
	
		
			
				|  |  |  |  |                   }, | 
		
	
		
			
				|  |  |  |  |                   header: const MaterialClassicHeader( | 
		
	
		
			
				|  |  |  |  |                     color: MyColors.gradiantEndColor, | 
		
	
		
			
				|  |  |  |  |                   ), | 
		
	
		
			
				|  |  |  |  |                   controller: _rc, | 
		
	
		
			
				|  |  |  |  |                   reverse: true, | 
		
	
		
			
				|  |  |  |  |                   child: ListView.separated( | 
		
	
		
			
				|  |  |  |  |                     controller: m.scrollController, | 
		
	
		
			
				|  |  |  |  |                     shrinkWrap: true, | 
		
	
		
			
				|  |  |  |  |                     physics: const BouncingScrollPhysics(), | 
		
	
		
			
				|  |  |  |  |                     reverse: true, | 
		
	
		
			
				|  |  |  |  |                     itemCount: m.groupChatHistory.length, | 
		
	
		
			
				|  |  |  |  |                     padding: const EdgeInsets.all(21), | 
		
	
		
			
				|  |  |  |  |                     separatorBuilder: (BuildContext cxt, int index) => 8.height, | 
		
	
		
			
				|  |  |  |  |                     itemBuilder: (BuildContext context, int i) { | 
		
	
		
			
				|  |  |  |  |                       return SwipeTo( | 
		
	
		
			
				|  |  |  |  |                         iconColor: MyColors.lightGreenColor, | 
		
	
		
			
				|  |  |  |  |                         child: GroupChatBubble( | 
		
	
		
			
				|  |  |  |  |                           dateTime: m.groupChatHistory[i].createdDate!, | 
		
	
		
			
				|  |  |  |  |                           cItem: m.groupChatHistory[i], | 
		
	
		
			
				|  |  |  |  |                         ), | 
		
	
		
			
				|  |  |  |  |                         onRightSwipe: (val) { | 
		
	
		
			
				|  |  |  |  |                           m.groupChatReply( | 
		
	
		
			
				|  |  |  |  |                             m.groupChatHistory[i], | 
		
	
		
			
				|  |  |  |  |                           ); | 
		
	
		
			
				|  |  |  |  |                     children: <Widget>[ | 
		
	
		
			
				|  |  |  |  |                       SmartRefresher( | 
		
	
		
			
				|  |  |  |  |                         enablePullDown: false, | 
		
	
		
			
				|  |  |  |  |                         enablePullUp: true, | 
		
	
		
			
				|  |  |  |  |                         onLoading: () { | 
		
	
		
			
				|  |  |  |  |                           getMoreChat(); | 
		
	
		
			
				|  |  |  |  |                         }, | 
		
	
		
			
				|  |  |  |  |                       ).onPress(() async { | 
		
	
		
			
				|  |  |  |  |                         logger.w(m.userChatHistory[i].toJson()); | 
		
	
		
			
				|  |  |  |  |                         if (m.userChatHistory[i].fileTypeResponse != null && m.userChatHistory[i].fileTypeId != null) { | 
		
	
		
			
				|  |  |  |  |                           if (m.userChatHistory[i].fileTypeId! == 1 || | 
		
	
		
			
				|  |  |  |  |                               m.userChatHistory[i].fileTypeId! == 5 || | 
		
	
		
			
				|  |  |  |  |                               m.userChatHistory[i].fileTypeId! == 7 || | 
		
	
		
			
				|  |  |  |  |                               m.userChatHistory[i].fileTypeId! == 6 || | 
		
	
		
			
				|  |  |  |  |                               m.userChatHistory[i].fileTypeId! == 8 | 
		
	
		
			
				|  |  |  |  |                           // || m.userChatHistory[i].fileTypeId! == 2 | 
		
	
		
			
				|  |  |  |  |                           ) { | 
		
	
		
			
				|  |  |  |  |                             m.getChatMedia(context, | 
		
	
		
			
				|  |  |  |  |                                 fileTypeName: m.userChatHistory[i].fileTypeResponse!.fileTypeName ?? "", fileTypeID: m.userChatHistory[i].fileTypeId!, fileName: m.userChatHistory[i].contant!); | 
		
	
		
			
				|  |  |  |  |                           } | 
		
	
		
			
				|  |  |  |  |                         } | 
		
	
		
			
				|  |  |  |  |                       }); | 
		
	
		
			
				|  |  |  |  |                     }, | 
		
	
		
			
				|  |  |  |  |                   ), | 
		
	
		
			
				|  |  |  |  |                 ).expanded, | 
		
	
		
			
				|  |  |  |  |                 if (m.isReplyMsg) | 
		
	
		
			
				|  |  |  |  |                   SizedBox( | 
		
	
		
			
				|  |  |  |  |                     height: 82, | 
		
	
		
			
				|  |  |  |  |                     child: Row( | 
		
	
		
			
				|  |  |  |  |                       children: <Widget>[ | 
		
	
		
			
				|  |  |  |  |                         Container(height: 82, color: MyColors.textMixColor, width: 6), | 
		
	
		
			
				|  |  |  |  |                         Container( | 
		
	
		
			
				|  |  |  |  |                           color: MyColors.darkTextColor.withOpacity(0.10), | 
		
	
		
			
				|  |  |  |  |                           padding: const EdgeInsets.only(top: 11, left: 14, bottom: 14, right: 21), | 
		
	
		
			
				|  |  |  |  |                         header: const MaterialClassicHeader( | 
		
	
		
			
				|  |  |  |  |                           color: MyColors.gradiantEndColor, | 
		
	
		
			
				|  |  |  |  |                         ), | 
		
	
		
			
				|  |  |  |  |                         controller: _rc, | 
		
	
		
			
				|  |  |  |  |                         reverse: true, | 
		
	
		
			
				|  |  |  |  |                         child: ListView.separated( | 
		
	
		
			
				|  |  |  |  |                           controller: m.scrollController, | 
		
	
		
			
				|  |  |  |  |                           shrinkWrap: true, | 
		
	
		
			
				|  |  |  |  |                           physics: const BouncingScrollPhysics(), | 
		
	
		
			
				|  |  |  |  |                           reverse: true, | 
		
	
		
			
				|  |  |  |  |                           itemCount: m.groupChatHistory.length, | 
		
	
		
			
				|  |  |  |  |                           padding: const EdgeInsets.all(21), | 
		
	
		
			
				|  |  |  |  |                           separatorBuilder: (BuildContext cxt, int index) => 8.height, | 
		
	
		
			
				|  |  |  |  |                           itemBuilder: (BuildContext context, int i) { | 
		
	
		
			
				|  |  |  |  |                             return SwipeTo( | 
		
	
		
			
				|  |  |  |  |                               iconColor: MyColors.lightGreenColor, | 
		
	
		
			
				|  |  |  |  |                               child: GroupChatBubble( | 
		
	
		
			
				|  |  |  |  |                                 dateTime: m.groupChatHistory[i].createdDate!, | 
		
	
		
			
				|  |  |  |  |                                 cItem: m.groupChatHistory[i], | 
		
	
		
			
				|  |  |  |  |                               ), | 
		
	
		
			
				|  |  |  |  |                               onRightSwipe: (val) { | 
		
	
		
			
				|  |  |  |  |                                 m.groupChatReply( | 
		
	
		
			
				|  |  |  |  |                                   m.groupChatHistory[i], | 
		
	
		
			
				|  |  |  |  |                                 ); | 
		
	
		
			
				|  |  |  |  |                               }, | 
		
	
		
			
				|  |  |  |  |                             ).onPress(() async { | 
		
	
		
			
				|  |  |  |  |                               logger.w(m.userChatHistory[i].toJson()); | 
		
	
		
			
				|  |  |  |  |                               if (m.userChatHistory[i].fileTypeResponse != null && m.userChatHistory[i].fileTypeId != null) { | 
		
	
		
			
				|  |  |  |  |                                 if (m.userChatHistory[i].fileTypeId! == 1 || | 
		
	
		
			
				|  |  |  |  |                                     m.userChatHistory[i].fileTypeId! == 5 || | 
		
	
		
			
				|  |  |  |  |                                     m.userChatHistory[i].fileTypeId! == 7 || | 
		
	
		
			
				|  |  |  |  |                                     m.userChatHistory[i].fileTypeId! == 6 || | 
		
	
		
			
				|  |  |  |  |                                     m.userChatHistory[i].fileTypeId! == 8 || | 
		
	
		
			
				|  |  |  |  |                                     m.userChatHistory[i].fileTypeId! == 16) { | 
		
	
		
			
				|  |  |  |  |                                   m.getChatMedia(context, | 
		
	
		
			
				|  |  |  |  |                                       fileTypeName: m.userChatHistory[i].fileTypeResponse!.fileTypeName ?? "", fileTypeID: m.userChatHistory[i].fileTypeId!, fileName: m.userChatHistory[i].contant!, fileSource: 2); | 
		
	
		
			
				|  |  |  |  |                                 } | 
		
	
		
			
				|  |  |  |  |                               } | 
		
	
		
			
				|  |  |  |  |                             }); | 
		
	
		
			
				|  |  |  |  |                           }, | 
		
	
		
			
				|  |  |  |  |                         ), | 
		
	
		
			
				|  |  |  |  |                       ).expanded, | 
		
	
		
			
				|  |  |  |  |                       if (m.isReplyMsg) | 
		
	
		
			
				|  |  |  |  |                         SizedBox( | 
		
	
		
			
				|  |  |  |  |                           height: 82, | 
		
	
		
			
				|  |  |  |  |                           child: Row( | 
		
	
		
			
				|  |  |  |  |                             children: [ | 
		
	
		
			
				|  |  |  |  |                               Column( | 
		
	
		
			
				|  |  |  |  |                                 crossAxisAlignment: CrossAxisAlignment.start, | 
		
	
		
			
				|  |  |  |  |                                 children: [ | 
		
	
		
			
				|  |  |  |  |                                   (AppState().chatDetails!.response!.userName == m.groupChatReplyData.first.currentUserName.toString() | 
		
	
		
			
				|  |  |  |  |                                       ? "You" | 
		
	
		
			
				|  |  |  |  |                                       : m.groupChatReplyData.first.currentUserName.toString().replaceAll(".", " ")) | 
		
	
		
			
				|  |  |  |  |                                       .toText14(color: MyColors.lightGreenColor), | 
		
	
		
			
				|  |  |  |  |                                   (m.groupChatReplyData.isNotEmpty ? m.groupChatReplyData.first.contant! : "").toText12(color: MyColors.grey71Color, maxLine: 2) | 
		
	
		
			
				|  |  |  |  |                                 ], | 
		
	
		
			
				|  |  |  |  |                             children: <Widget>[ | 
		
	
		
			
				|  |  |  |  |                               Container(height: 82, color: MyColors.textMixColor, width: 6), | 
		
	
		
			
				|  |  |  |  |                               Container( | 
		
	
		
			
				|  |  |  |  |                                 color: MyColors.darkTextColor.withOpacity(0.10), | 
		
	
		
			
				|  |  |  |  |                                 padding: const EdgeInsets.only(top: 11, left: 14, bottom: 14, right: 21), | 
		
	
		
			
				|  |  |  |  |                                 child: Row( | 
		
	
		
			
				|  |  |  |  |                                   children: [ | 
		
	
		
			
				|  |  |  |  |                                     Column( | 
		
	
		
			
				|  |  |  |  |                                       crossAxisAlignment: CrossAxisAlignment.start, | 
		
	
		
			
				|  |  |  |  |                                       children: [ | 
		
	
		
			
				|  |  |  |  |                                         (AppState().chatDetails!.response!.userName == m.groupChatReplyData.first.currentUserName.toString() | 
		
	
		
			
				|  |  |  |  |                                                 ? "You" | 
		
	
		
			
				|  |  |  |  |                                                 : m.groupChatReplyData.first.currentUserName.toString().replaceAll(".", " ")) | 
		
	
		
			
				|  |  |  |  |                                             .toText14(color: MyColors.lightGreenColor), | 
		
	
		
			
				|  |  |  |  |                                         (m.groupChatReplyData.isNotEmpty ? m.groupChatReplyData.first.contant! : "").toText12(color: MyColors.grey71Color, maxLine: 2) | 
		
	
		
			
				|  |  |  |  |                                       ], | 
		
	
		
			
				|  |  |  |  |                                     ).expanded, | 
		
	
		
			
				|  |  |  |  |                                     12.width, | 
		
	
		
			
				|  |  |  |  |                                     if (m.isReplyMsg && m.groupChatReplyData.isNotEmpty) showReplyImage(m.groupChatReplyData, m), | 
		
	
		
			
				|  |  |  |  |                                     12.width, | 
		
	
		
			
				|  |  |  |  |                                     const Icon(Icons.cancel, size: 23, color: MyColors.grey7BColor).onPress(m.closeMe), | 
		
	
		
			
				|  |  |  |  |                                   ], | 
		
	
		
			
				|  |  |  |  |                                 ), | 
		
	
		
			
				|  |  |  |  |                               ).expanded, | 
		
	
		
			
				|  |  |  |  |                               12.width, | 
		
	
		
			
				|  |  |  |  |                               if (m.isReplyMsg && m.groupChatReplyData.isNotEmpty) showReplyImage(m.groupChatReplyData, m), | 
		
	
		
			
				|  |  |  |  |                               12.width, | 
		
	
		
			
				|  |  |  |  |                               const Icon(Icons.cancel, size: 23, color: MyColors.grey7BColor).onPress(m.closeMe), | 
		
	
		
			
				|  |  |  |  |                             ], | 
		
	
		
			
				|  |  |  |  |                           ), | 
		
	
		
			
				|  |  |  |  |                         ).expanded, | 
		
	
		
			
				|  |  |  |  |                       ], | 
		
	
		
			
				|  |  |  |  |                     ), | 
		
	
		
			
				|  |  |  |  |                   ), | 
		
	
		
			
				|  |  |  |  |                 if (m.isAttachmentMsg && m.sFileType == ".png" || m.sFileType == ".jpeg" || m.sFileType == ".jpg") | 
		
	
		
			
				|  |  |  |  |                   SizedBox(height: 200, width: double.infinity, child: Image.file(m.selectedFile, fit: BoxFit.cover)).paddingOnly(left: 21, right: 21, top: 21), | 
		
	
		
			
				|  |  |  |  |                 const Divider(height: 1, color: MyColors.lightGreyEFColor), | 
		
	
		
			
				|  |  |  |  |                 if (m.isRecoding) | 
		
	
		
			
				|  |  |  |  |                   Column( | 
		
	
		
			
				|  |  |  |  |                     children: <Widget>[ | 
		
	
		
			
				|  |  |  |  |                       Row( | 
		
	
		
			
				|  |  |  |  |                         children: [ | 
		
	
		
			
				|  |  |  |  |                           Text(m.buildTimer()).paddingAll(10), | 
		
	
		
			
				|  |  |  |  |                           if (m.isRecoding && m.isPlaying) | 
		
	
		
			
				|  |  |  |  |                             WaveBubble( | 
		
	
		
			
				|  |  |  |  |                               playerController: m.playerController, | 
		
	
		
			
				|  |  |  |  |                               isPlaying: m.playerController.playerState == PlayerState.playing, | 
		
	
		
			
				|  |  |  |  |                               onTap: () {}, | 
		
	
		
			
				|  |  |  |  |                             ).expanded | 
		
	
		
			
				|  |  |  |  |                           else | 
		
	
		
			
				|  |  |  |  |                             AudioWaveforms( | 
		
	
		
			
				|  |  |  |  |                               waveStyle: const WaveStyle( | 
		
	
		
			
				|  |  |  |  |                                 waveColor: MyColors.lightGreenColor, | 
		
	
		
			
				|  |  |  |  |                                 middleLineColor: Colors.transparent, | 
		
	
		
			
				|  |  |  |  |                                 extendWaveform: true, | 
		
	
		
			
				|  |  |  |  |                                 showBottom: true, | 
		
	
		
			
				|  |  |  |  |                                 showTop: true, | 
		
	
		
			
				|  |  |  |  |                                 waveThickness: 2, | 
		
	
		
			
				|  |  |  |  |                                 showMiddleLine: false, | 
		
	
		
			
				|  |  |  |  |                                 middleLineThickness: 0, | 
		
	
		
			
				|  |  |  |  |                               ), | 
		
	
		
			
				|  |  |  |  |                               padding: const EdgeInsets.all(5), | 
		
	
		
			
				|  |  |  |  |                               shouldCalculateScrolledPosition: false, | 
		
	
		
			
				|  |  |  |  |                               margin: EdgeInsets.zero, | 
		
	
		
			
				|  |  |  |  |                               size: const Size(double.infinity, 30.0), | 
		
	
		
			
				|  |  |  |  |                               recorderController: m.recorderController, | 
		
	
		
			
				|  |  |  |  |                               backgroundColor: Colors.white, | 
		
	
		
			
				|  |  |  |  |                             ).expanded, | 
		
	
		
			
				|  |  |  |  |                         ], | 
		
	
		
			
				|  |  |  |  |                       ), | 
		
	
		
			
				|  |  |  |  |                       Row( | 
		
	
		
			
				|  |  |  |  |                         mainAxisAlignment: MainAxisAlignment.spaceBetween, | 
		
	
		
			
				|  |  |  |  |                         children: [ | 
		
	
		
			
				|  |  |  |  |                           const Icon( | 
		
	
		
			
				|  |  |  |  |                             Icons.delete_outlined, | 
		
	
		
			
				|  |  |  |  |                             size: 26, | 
		
	
		
			
				|  |  |  |  |                             color: MyColors.lightGreenColor, | 
		
	
		
			
				|  |  |  |  |                           ).paddingAll(10).onPress(() { | 
		
	
		
			
				|  |  |  |  |                             m.deleteRecoding(); | 
		
	
		
			
				|  |  |  |  |                           }), | 
		
	
		
			
				|  |  |  |  |                           SvgPicture.asset("assets/icons/chat/chat_send_icon.svg", height: 26, width: 26) | 
		
	
		
			
				|  |  |  |  |                               .onPress( | 
		
	
		
			
				|  |  |  |  |                                 () =>  m.sendGroupChatMessage(context, | 
		
	
		
			
				|  |  |  |  |                                     targetUserId: params!.groupChatDetails!.groupId!, | 
		
	
		
			
				|  |  |  |  |                                     userStatus: 0, | 
		
	
		
			
				|  |  |  |  |                                     userEmail: "", | 
		
	
		
			
				|  |  |  |  |                                     targetUserName: params!.groupChatDetails!.groupName!, | 
		
	
		
			
				|  |  |  |  |                                     userList: params!.groupChatDetails!.groupUserList! | 
		
	
		
			
				|  |  |  |  |                                 ), | 
		
	
		
			
				|  |  |  |  |                           ) | 
		
	
		
			
				|  |  |  |  |                               .paddingOnly(right: 21), | 
		
	
		
			
				|  |  |  |  |                         ], | 
		
	
		
			
				|  |  |  |  |                       ), | 
		
	
		
			
				|  |  |  |  |                     ], | 
		
	
		
			
				|  |  |  |  |                   ).objectContainerView(disablePadding: true, radius: 0), | 
		
	
		
			
				|  |  |  |  |                 if (!m.isRecoding) | 
		
	
		
			
				|  |  |  |  |                   Row( | 
		
	
		
			
				|  |  |  |  |                     children: [ | 
		
	
		
			
				|  |  |  |  |                       CustomAutoDirection( | 
		
	
		
			
				|  |  |  |  |                         onDirectionChange: (bool isRTL) => m.onDirectionChange(isRTL), | 
		
	
		
			
				|  |  |  |  |                         text: m.msgText, | 
		
	
		
			
				|  |  |  |  |                         child: TextField( | 
		
	
		
			
				|  |  |  |  |                           //    textDirection: m.textDirection, | 
		
	
		
			
				|  |  |  |  |                           controller: m.message, | 
		
	
		
			
				|  |  |  |  |                           decoration: InputDecoration( | 
		
	
		
			
				|  |  |  |  |                             hintTextDirection: m.textDirection, | 
		
	
		
			
				|  |  |  |  |                             hintText: m.isAttachmentMsg ? m.selectedFile.path.split("/").last : LocaleKeys.typeheretoreply.tr(), | 
		
	
		
			
				|  |  |  |  |                             hintStyle: TextStyle(color: m.isAttachmentMsg ? MyColors.darkTextColor : MyColors.grey98Color, fontSize: 14), | 
		
	
		
			
				|  |  |  |  |                             border: InputBorder.none, | 
		
	
		
			
				|  |  |  |  |                             focusedBorder: InputBorder.none, | 
		
	
		
			
				|  |  |  |  |                             enabledBorder: InputBorder.none, | 
		
	
		
			
				|  |  |  |  |                             errorBorder: InputBorder.none, | 
		
	
		
			
				|  |  |  |  |                             disabledBorder: InputBorder.none, | 
		
	
		
			
				|  |  |  |  |                             filled: true, | 
		
	
		
			
				|  |  |  |  |                             fillColor: MyColors.white, | 
		
	
		
			
				|  |  |  |  |                             contentPadding: const EdgeInsets.only( | 
		
	
		
			
				|  |  |  |  |                               left: 21, | 
		
	
		
			
				|  |  |  |  |                               top: 20, | 
		
	
		
			
				|  |  |  |  |                               bottom: 20, | 
		
	
		
			
				|  |  |  |  |                             ), | 
		
	
		
			
				|  |  |  |  |                             prefixIconConstraints: const BoxConstraints(), | 
		
	
		
			
				|  |  |  |  |                             prefixIcon: m.sFileType.isNotEmpty | 
		
	
		
			
				|  |  |  |  |                                 ? SvgPicture.asset(m.getType(m.sFileType), height: 30, width: 22, alignment: Alignment.center, fit: BoxFit.cover).paddingOnly(left: 21, right: 15) | 
		
	
		
			
				|  |  |  |  |                                 : null, | 
		
	
		
			
				|  |  |  |  |                           ), | 
		
	
		
			
				|  |  |  |  |                           onChanged: (String val) { | 
		
	
		
			
				|  |  |  |  |                             m.inputBoxDirection(val); | 
		
	
		
			
				|  |  |  |  |                             m.groupTypingInvoke(groupDetails:  params!.groupChatDetails!, groupId: params!.groupChatDetails!.groupId!); | 
		
	
		
			
				|  |  |  |  |                           }, | 
		
	
		
			
				|  |  |  |  |                         ).expanded, | 
		
	
		
			
				|  |  |  |  |                       ), | 
		
	
		
			
				|  |  |  |  |                       if (m.sFileType.isNotEmpty) | 
		
	
		
			
				|  |  |  |  |                         Row( | 
		
	
		
			
				|  |  |  |  |                         ), | 
		
	
		
			
				|  |  |  |  |                       if (m.isAttachmentMsg && m.sFileType == ".png" || m.sFileType == ".jpeg" || m.sFileType == ".jpg") | 
		
	
		
			
				|  |  |  |  |                         SizedBox(height: 200, width: double.infinity, child: Image.file(m.selectedFile, fit: BoxFit.cover)).paddingOnly(left: 21, right: 21, top: 21), | 
		
	
		
			
				|  |  |  |  |                       const Divider(height: 1, color: MyColors.lightGreyEFColor), | 
		
	
		
			
				|  |  |  |  |                       if (m.isRecoding) | 
		
	
		
			
				|  |  |  |  |                         Column( | 
		
	
		
			
				|  |  |  |  |                           children: <Widget>[ | 
		
	
		
			
				|  |  |  |  |                             const Icon(Icons.cancel, size: 15, color: MyColors.redA3Color).paddingOnly(right: 5), | 
		
	
		
			
				|  |  |  |  |                             ("Clear").toText11(color: MyColors.redA3Color, isUnderLine: true).paddingOnly(left: 0), | 
		
	
		
			
				|  |  |  |  |                             Row( | 
		
	
		
			
				|  |  |  |  |                               children: [ | 
		
	
		
			
				|  |  |  |  |                                 Text(m.buildTimer()).paddingAll(10), | 
		
	
		
			
				|  |  |  |  |                                 if (m.isRecoding && m.isPlaying) | 
		
	
		
			
				|  |  |  |  |                                   WaveBubble( | 
		
	
		
			
				|  |  |  |  |                                     playerController: m.playerController, | 
		
	
		
			
				|  |  |  |  |                                     isPlaying: m.playerController.playerState == PlayerState.playing, | 
		
	
		
			
				|  |  |  |  |                                     onTap: () {}, | 
		
	
		
			
				|  |  |  |  |                                   ).expanded | 
		
	
		
			
				|  |  |  |  |                                 else | 
		
	
		
			
				|  |  |  |  |                                   AudioWaveforms( | 
		
	
		
			
				|  |  |  |  |                                     waveStyle: const WaveStyle( | 
		
	
		
			
				|  |  |  |  |                                       waveColor: MyColors.lightGreenColor, | 
		
	
		
			
				|  |  |  |  |                                       middleLineColor: Colors.transparent, | 
		
	
		
			
				|  |  |  |  |                                       extendWaveform: true, | 
		
	
		
			
				|  |  |  |  |                                       showBottom: true, | 
		
	
		
			
				|  |  |  |  |                                       showTop: true, | 
		
	
		
			
				|  |  |  |  |                                       waveThickness: 2, | 
		
	
		
			
				|  |  |  |  |                                       showMiddleLine: false, | 
		
	
		
			
				|  |  |  |  |                                       middleLineThickness: 0, | 
		
	
		
			
				|  |  |  |  |                                     ), | 
		
	
		
			
				|  |  |  |  |                                     padding: const EdgeInsets.all(5), | 
		
	
		
			
				|  |  |  |  |                                     shouldCalculateScrolledPosition: false, | 
		
	
		
			
				|  |  |  |  |                                     margin: EdgeInsets.zero, | 
		
	
		
			
				|  |  |  |  |                                     size: const Size(double.infinity, 30.0), | 
		
	
		
			
				|  |  |  |  |                                     recorderController: m.recorderController, | 
		
	
		
			
				|  |  |  |  |                                     backgroundColor: Colors.white, | 
		
	
		
			
				|  |  |  |  |                                   ).expanded, | 
		
	
		
			
				|  |  |  |  |                               ], | 
		
	
		
			
				|  |  |  |  |                             ), | 
		
	
		
			
				|  |  |  |  |                             Row( | 
		
	
		
			
				|  |  |  |  |                               mainAxisAlignment: MainAxisAlignment.spaceBetween, | 
		
	
		
			
				|  |  |  |  |                               children: [ | 
		
	
		
			
				|  |  |  |  |                                 const Icon( | 
		
	
		
			
				|  |  |  |  |                                   Icons.delete_outlined, | 
		
	
		
			
				|  |  |  |  |                                   size: 26, | 
		
	
		
			
				|  |  |  |  |                                   color: MyColors.lightGreenColor, | 
		
	
		
			
				|  |  |  |  |                                 ).paddingAll(10).onPress(() { | 
		
	
		
			
				|  |  |  |  |                                   m.deleteRecoding(); | 
		
	
		
			
				|  |  |  |  |                                 }), | 
		
	
		
			
				|  |  |  |  |                                 SvgPicture.asset("assets/icons/chat/chat_send_icon.svg", height: 26, width: 26) | 
		
	
		
			
				|  |  |  |  |                                     .onPress( | 
		
	
		
			
				|  |  |  |  |                                       () => m.sendGroupChatMessage(context, | 
		
	
		
			
				|  |  |  |  |                                           targetUserId: params!.groupChatDetails!.groupId!, | 
		
	
		
			
				|  |  |  |  |                                           userStatus: 0, | 
		
	
		
			
				|  |  |  |  |                                           userEmail: "", | 
		
	
		
			
				|  |  |  |  |                                           targetUserName: params!.groupChatDetails!.groupName!, | 
		
	
		
			
				|  |  |  |  |                                           userList: params!.groupChatDetails!.groupUserList!), | 
		
	
		
			
				|  |  |  |  |                                     ) | 
		
	
		
			
				|  |  |  |  |                                     .paddingOnly(right: 21), | 
		
	
		
			
				|  |  |  |  |                               ], | 
		
	
		
			
				|  |  |  |  |                             ), | 
		
	
		
			
				|  |  |  |  |                           ], | 
		
	
		
			
				|  |  |  |  |                         ).onPress(() => m.removeAttachment()).paddingOnly(right: 15), | 
		
	
		
			
				|  |  |  |  |                       if (m.sFileType.isEmpty) | 
		
	
		
			
				|  |  |  |  |                         RotationTransition( | 
		
	
		
			
				|  |  |  |  |                           turns: const AlwaysStoppedAnimation(45 / 360), | 
		
	
		
			
				|  |  |  |  |                           child: const Icon(Icons.attach_file_rounded, size: 26, color: MyColors.grey3AColor).onPress( | 
		
	
		
			
				|  |  |  |  |                                 () => { | 
		
	
		
			
				|  |  |  |  |                                   m.selectImageToUpload(context) | 
		
	
		
			
				|  |  |  |  |                         ).objectContainerView(disablePadding: true, radius: 0), | 
		
	
		
			
				|  |  |  |  |                       if (!m.isRecoding) | 
		
	
		
			
				|  |  |  |  |                         Row( | 
		
	
		
			
				|  |  |  |  |                           children: [ | 
		
	
		
			
				|  |  |  |  |                             CustomAutoDirection( | 
		
	
		
			
				|  |  |  |  |                               onDirectionChange: (bool isRTL) => m.onDirectionChange(isRTL), | 
		
	
		
			
				|  |  |  |  |                               text: m.msgText, | 
		
	
		
			
				|  |  |  |  |                               child: TextField( | 
		
	
		
			
				|  |  |  |  |                                 //    textDirection: m.textDirection, | 
		
	
		
			
				|  |  |  |  |                                 controller: m.message, | 
		
	
		
			
				|  |  |  |  |                                 decoration: InputDecoration( | 
		
	
		
			
				|  |  |  |  |                                   hintTextDirection: m.textDirection, | 
		
	
		
			
				|  |  |  |  |                                   hintText: m.isAttachmentMsg ? m.selectedFile.path.split("/").last : LocaleKeys.typeheretoreply.tr(), | 
		
	
		
			
				|  |  |  |  |                                   hintStyle: TextStyle(color: m.isAttachmentMsg ? MyColors.darkTextColor : MyColors.grey98Color, fontSize: 14), | 
		
	
		
			
				|  |  |  |  |                                   border: InputBorder.none, | 
		
	
		
			
				|  |  |  |  |                                   focusedBorder: InputBorder.none, | 
		
	
		
			
				|  |  |  |  |                                   enabledBorder: InputBorder.none, | 
		
	
		
			
				|  |  |  |  |                                   errorBorder: InputBorder.none, | 
		
	
		
			
				|  |  |  |  |                                   disabledBorder: InputBorder.none, | 
		
	
		
			
				|  |  |  |  |                                   filled: true, | 
		
	
		
			
				|  |  |  |  |                                   fillColor: MyColors.white, | 
		
	
		
			
				|  |  |  |  |                                   contentPadding: const EdgeInsets.only( | 
		
	
		
			
				|  |  |  |  |                                     left: 21, | 
		
	
		
			
				|  |  |  |  |                                     top: 20, | 
		
	
		
			
				|  |  |  |  |                                     bottom: 20, | 
		
	
		
			
				|  |  |  |  |                                   ), | 
		
	
		
			
				|  |  |  |  |                                   prefixIconConstraints: const BoxConstraints(), | 
		
	
		
			
				|  |  |  |  |                                   prefixIcon: m.sFileType.isNotEmpty | 
		
	
		
			
				|  |  |  |  |                                       ? SvgPicture.asset(m.getType(m.sFileType), height: 30, width: 22, alignment: Alignment.center, fit: BoxFit.cover).paddingOnly(left: 21, right: 15) | 
		
	
		
			
				|  |  |  |  |                                       : null, | 
		
	
		
			
				|  |  |  |  |                                 ), | 
		
	
		
			
				|  |  |  |  |                                 onChanged: (String val) { | 
		
	
		
			
				|  |  |  |  |                                   m.inputBoxDirection(val); | 
		
	
		
			
				|  |  |  |  |                                   m.groupTypingInvoke(groupDetails: params!.groupChatDetails!, groupId: params!.groupChatDetails!.groupId!); | 
		
	
		
			
				|  |  |  |  |                                 }, | 
		
	
		
			
				|  |  |  |  |                           ), | 
		
	
		
			
				|  |  |  |  |                         ).paddingOnly(right: 15), | 
		
	
		
			
				|  |  |  |  |                       const Icon( | 
		
	
		
			
				|  |  |  |  |                         Icons.mic, | 
		
	
		
			
				|  |  |  |  |                         color: MyColors.lightGreenColor, | 
		
	
		
			
				|  |  |  |  |                       ).paddingOnly(right: 15).onPress(() { | 
		
	
		
			
				|  |  |  |  |                         m.startRecoding(context); | 
		
	
		
			
				|  |  |  |  |                       }), | 
		
	
		
			
				|  |  |  |  |                       SvgPicture.asset("assets/icons/chat/chat_send_icon.svg", height: 26, width: 26) | 
		
	
		
			
				|  |  |  |  |                           .onPress( | 
		
	
		
			
				|  |  |  |  |                             () =>m.sendGroupChatMessage(context, | 
		
	
		
			
				|  |  |  |  |                                 targetUserId: params!.groupChatDetails!.groupId!, | 
		
	
		
			
				|  |  |  |  |                                 userStatus: 0, | 
		
	
		
			
				|  |  |  |  |                                 userEmail: "", | 
		
	
		
			
				|  |  |  |  |                                 targetUserName: params!.groupChatDetails!.groupName!, | 
		
	
		
			
				|  |  |  |  |                                 userList: params!.groupChatDetails!.groupUserList! | 
		
	
		
			
				|  |  |  |  |                               ).expanded, | 
		
	
		
			
				|  |  |  |  |                             ), | 
		
	
		
			
				|  |  |  |  |                       ) | 
		
	
		
			
				|  |  |  |  |                           .paddingOnly(right: 21), | 
		
	
		
			
				|  |  |  |  |                             if (m.sFileType.isNotEmpty) | 
		
	
		
			
				|  |  |  |  |                               Row( | 
		
	
		
			
				|  |  |  |  |                                 children: <Widget>[ | 
		
	
		
			
				|  |  |  |  |                                   const Icon(Icons.cancel, size: 15, color: MyColors.redA3Color).paddingOnly(right: 5), | 
		
	
		
			
				|  |  |  |  |                                   ("Clear").toText11(color: MyColors.redA3Color, isUnderLine: true).paddingOnly(left: 0), | 
		
	
		
			
				|  |  |  |  |                                 ], | 
		
	
		
			
				|  |  |  |  |                               ).onPress(() => m.removeAttachment()).paddingOnly(right: 15), | 
		
	
		
			
				|  |  |  |  |                             if (m.sFileType.isEmpty) | 
		
	
		
			
				|  |  |  |  |                               RotationTransition( | 
		
	
		
			
				|  |  |  |  |                                 turns: const AlwaysStoppedAnimation(45 / 360), | 
		
	
		
			
				|  |  |  |  |                                 child: const Icon(Icons.attach_file_rounded, size: 26, color: MyColors.grey3AColor).onPress( | 
		
	
		
			
				|  |  |  |  |                                   () => {m.selectImageToUpload(context)}, | 
		
	
		
			
				|  |  |  |  |                                 ), | 
		
	
		
			
				|  |  |  |  |                               ).paddingOnly(right: 15), | 
		
	
		
			
				|  |  |  |  |                             const Icon( | 
		
	
		
			
				|  |  |  |  |                               Icons.mic, | 
		
	
		
			
				|  |  |  |  |                               color: MyColors.lightGreenColor, | 
		
	
		
			
				|  |  |  |  |                             ).paddingOnly(right: 15).onPress(() { | 
		
	
		
			
				|  |  |  |  |                               m.startRecoding(context); | 
		
	
		
			
				|  |  |  |  |                             }), | 
		
	
		
			
				|  |  |  |  |                             SvgPicture.asset("assets/icons/chat/chat_send_icon.svg", height: 26, width: 26) | 
		
	
		
			
				|  |  |  |  |                                 .onPress( | 
		
	
		
			
				|  |  |  |  |                                   () => m.sendGroupChatMessage(context, | 
		
	
		
			
				|  |  |  |  |                                       targetUserId: params!.groupChatDetails!.groupId!, | 
		
	
		
			
				|  |  |  |  |                                       userStatus: 0, | 
		
	
		
			
				|  |  |  |  |                                       userEmail: "", | 
		
	
		
			
				|  |  |  |  |                                       targetUserName: params!.groupChatDetails!.groupName!, | 
		
	
		
			
				|  |  |  |  |                                       userList: params!.groupChatDetails!.groupUserList!), | 
		
	
		
			
				|  |  |  |  |                                 ) | 
		
	
		
			
				|  |  |  |  |                                 .paddingOnly(right: 21), | 
		
	
		
			
				|  |  |  |  |                           ], | 
		
	
		
			
				|  |  |  |  |                         ).objectContainerView(disablePadding: true, radius: 0), | 
		
	
		
			
				|  |  |  |  |                     ], | 
		
	
		
			
				|  |  |  |  |                   ).objectContainerView(disablePadding: true, radius: 0), | 
		
	
		
			
				|  |  |  |  |               ], | 
		
	
		
			
				|  |  |  |  |             )); | 
		
	
		
			
				|  |  |  |  |                   )); | 
		
	
		
			
				|  |  |  |  |           }, | 
		
	
		
			
				|  |  |  |  |         ), | 
		
	
		
			
				|  |  |  |  |       ), | 
		
	
	
		
			
				
					|  |  |  | @ -352,11 +346,11 @@ class _GroupChatDetailScreenState extends State<GroupChatDetailScreen> { | 
		
	
		
			
				|  |  |  |  |     } else { | 
		
	
		
			
				|  |  |  |  |       return data.first.fileTypeResponse != null && data.first.fileTypeResponse!.fileTypeName != null | 
		
	
		
			
				|  |  |  |  |           ? Container( | 
		
	
		
			
				|  |  |  |  |           width: 43, | 
		
	
		
			
				|  |  |  |  |           height: 43, | 
		
	
		
			
				|  |  |  |  |           constraints: const BoxConstraints(), | 
		
	
		
			
				|  |  |  |  |           decoration: BoxDecoration(border: Border.all(color: MyColors.darkGrey3BColor, width: 1), borderRadius: BorderRadius.circular(10.0), color: Colors.white), | 
		
	
		
			
				|  |  |  |  |           child: SvgPicture.asset(m.getType(data.first.fileTypeResponse!.fileTypeName ?? ""), alignment: Alignment.center, fit: BoxFit.cover).paddingOnly(left: 5, right: 5, top: 5, bottom: 5)) | 
		
	
		
			
				|  |  |  |  |               width: 43, | 
		
	
		
			
				|  |  |  |  |               height: 43, | 
		
	
		
			
				|  |  |  |  |               constraints: const BoxConstraints(), | 
		
	
		
			
				|  |  |  |  |               decoration: BoxDecoration(border: Border.all(color: MyColors.darkGrey3BColor, width: 1), borderRadius: BorderRadius.circular(10.0), color: Colors.white), | 
		
	
		
			
				|  |  |  |  |               child: SvgPicture.asset(m.getType(data.first.fileTypeResponse!.fileTypeName ?? ""), alignment: Alignment.center, fit: BoxFit.cover).paddingOnly(left: 5, right: 5, top: 5, bottom: 5)) | 
		
	
		
			
				|  |  |  |  |           : const SizedBox(); | 
		
	
		
			
				|  |  |  |  |     } | 
		
	
		
			
				|  |  |  |  |   } | 
		
	
	
		
			
				
					|  |  |  | @ -373,22 +367,22 @@ class _GroupChatDetailScreenState extends State<GroupChatDetailScreen> { | 
		
	
		
			
				|  |  |  |  |     //   "calltype": callType == "VIDEO" ? "Video" : "Audio", | 
		
	
		
			
				|  |  |  |  |     // }; | 
		
	
		
			
				|  |  |  |  |     logger.w(json); | 
		
	
		
			
				|  |  |  |  |    // CallDataModel callData = CallDataModel.fromJson(json); | 
		
	
		
			
				|  |  |  |  |    //  await Navigator.push( | 
		
	
		
			
				|  |  |  |  |    //    context, | 
		
	
		
			
				|  |  |  |  |    //    MaterialPageRoute( | 
		
	
		
			
				|  |  |  |  |    //      builder: (BuildContext context) => OutGoingCall( | 
		
	
		
			
				|  |  |  |  |    //        isVideoCall: callType == "VIDEO" ? true : false, | 
		
	
		
			
				|  |  |  |  |    //        outGoingCallData: callData, | 
		
	
		
			
				|  |  |  |  |    //      ), | 
		
	
		
			
				|  |  |  |  |    //    ), | 
		
	
		
			
				|  |  |  |  |    //  ).then((value) { | 
		
	
		
			
				|  |  |  |  |    //    print("then"); | 
		
	
		
			
				|  |  |  |  |    //    callPro.stopListeners(); | 
		
	
		
			
				|  |  |  |  |    //  }); | 
		
	
		
			
				|  |  |  |  |     // CallDataModel callData = CallDataModel.fromJson(json); | 
		
	
		
			
				|  |  |  |  |     //  await Navigator.push( | 
		
	
		
			
				|  |  |  |  |     //    context, | 
		
	
		
			
				|  |  |  |  |     //    MaterialPageRoute( | 
		
	
		
			
				|  |  |  |  |     //      builder: (BuildContext context) => OutGoingCall( | 
		
	
		
			
				|  |  |  |  |     //        isVideoCall: callType == "VIDEO" ? true : false, | 
		
	
		
			
				|  |  |  |  |     //        outGoingCallData: callData, | 
		
	
		
			
				|  |  |  |  |     //      ), | 
		
	
		
			
				|  |  |  |  |     //    ), | 
		
	
		
			
				|  |  |  |  |     //  ).then((value) { | 
		
	
		
			
				|  |  |  |  |     //    print("then"); | 
		
	
		
			
				|  |  |  |  |     //    callPro.stopListeners(); | 
		
	
		
			
				|  |  |  |  |     //  }); | 
		
	
		
			
				|  |  |  |  |   } | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  |   GroupUserList getCurrentUser(int id, GroupResponse groupChatDetails) { | 
		
	
		
			
				|  |  |  |  |    return groupChatDetails.groupUserList!.firstWhere((GroupUserList item) => item.id ==id); | 
		
	
		
			
				|  |  |  |  |     return groupChatDetails.groupUserList!.firstWhere((GroupUserList item) => item.id == id); | 
		
	
		
			
				|  |  |  |  |   } | 
		
	
		
			
				|  |  |  |  | 
 | 
		
	
		
			
				|  |  |  |  | } | 
		
	
	
		
			
				
					|  |  |  | 
 |