Skip to content

Commit

Permalink
chore: 🔨 Code format
Browse files Browse the repository at this point in the history
  • Loading branch information
vatsaltanna-simformsolutions committed Aug 6, 2024
1 parent a4e1318 commit c7de8cb
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 21 deletions.
4 changes: 2 additions & 2 deletions lib/src/widgets/chat_list_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@ class _ChatListWidgetState extends State<ChatListWidget>
replyMessage: widget.replyMessage,
onChatBubbleLongPress: (yCoordinate, xCoordinate, message) {
if (featureActiveConfig?.enableReactionPopup ?? false) {
chatViewIW?.reactionPopupKey.currentState?.refreshWidget(
chatViewIW?.reactionPopupKey.currentState
?.refreshWidget(
message: message,
xCoordinate: xCoordinate,
yCoordinate: yCoordinate,
Expand All @@ -162,7 +163,6 @@ class _ChatListWidgetState extends State<ChatListWidget>
},
onChatListTap: _onChatListTap,
),

],
);
},
Expand Down
20 changes: 11 additions & 9 deletions lib/src/widgets/chat_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -200,15 +200,15 @@ class _ChatViewState extends State<ChatView>
Container(
height: chatBackgroundConfig.height ??
MediaQuery.of(context).size.height,
width:
chatBackgroundConfig.width ?? MediaQuery.of(context).size.width,
width: chatBackgroundConfig.width ??
MediaQuery.of(context).size.width,
decoration: BoxDecoration(
color: chatBackgroundConfig.backgroundColor ?? Colors.white,
image: chatBackgroundConfig.backgroundImage != null
? DecorationImage(
fit: BoxFit.fill,
image:
NetworkImage(chatBackgroundConfig.backgroundImage!),
image: NetworkImage(
chatBackgroundConfig.backgroundImage!),
)
: null,
),
Expand Down Expand Up @@ -264,9 +264,9 @@ class _ChatViewState extends State<ChatView>
isLastPage: widget.isLastPage,
loadingWidget: widget.loadingWidget,
onChatListTap: widget.onChatListTap,
assignReplyMessage: (message) => _sendMessageKey
.currentState
?.assignReplyMessage(message),
assignReplyMessage: (message) =>
_sendMessageKey.currentState
?.assignReplyMessage(message),
);
},
),
Expand All @@ -275,13 +275,15 @@ class _ChatViewState extends State<ChatView>
key: _sendMessageKey,
sendMessageBuilder: widget.sendMessageBuilder,
sendMessageConfig: widget.sendMessageConfig,
onSendTap: (message, replyMessage, messageType) {
onSendTap:
(message, replyMessage, messageType) {
if (context.suggestionsConfig
?.autoDismissOnSelection ??
true) {
chatController.removeReplySuggestions();
}
_onSendTap(message, replyMessage, messageType);
_onSendTap(
message, replyMessage, messageType);
},
onReplyCallback: (reply) =>
replyMessage.value = reply,
Expand Down
1 change: 0 additions & 1 deletion lib/src/widgets/chat_view_inherited_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ class ChatViewInheritedWidget extends InheritedWidget {
final ValueNotifier<bool> showPopUp = ValueNotifier(false);
final GlobalKey<ReactionPopupState> reactionPopupKey = GlobalKey();


static ChatViewInheritedWidget? of(BuildContext context) =>
context.dependOnInheritedWidgetOfExactType<ChatViewInheritedWidget>();

Expand Down
9 changes: 4 additions & 5 deletions lib/src/widgets/chatui_textfield.dart
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,7 @@ class _ChatUITextFieldState extends State<ChatUITextField> {
if (isRecordingValue && controller != null && !kIsWeb)
Expanded(
child: AudioWaveforms(
size: const Size(
double.maxFinite,
50),
size: const Size(double.maxFinite, 50),
recorderController: controller!,
margin: voiceRecordingConfig?.margin,
padding: voiceRecordingConfig?.padding ??
Expand All @@ -167,8 +165,9 @@ class _ChatUITextFieldState extends State<ChatUITextField> {
WaveStyle(
extendWaveform: true,
showMiddleLine: false,
waveColor: voiceRecordingConfig?.waveStyle?.waveColor ??
Colors.black,
waveColor:
voiceRecordingConfig?.waveStyle?.waveColor ??
Colors.black,
),
),
)
Expand Down
6 changes: 4 additions & 2 deletions lib/src/widgets/image_message_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ class ImageMessageView extends StatelessWidget {
mainAxisAlignment:
isMessageBySender ? MainAxisAlignment.end : MainAxisAlignment.start,
children: [
if (isMessageBySender && !(imageMessageConfig?.hideShareIcon ?? false)) iconButton,
if (isMessageBySender && !(imageMessageConfig?.hideShareIcon ?? false))
iconButton,
Stack(
children: [
GestureDetector(
Expand Down Expand Up @@ -141,7 +142,8 @@ class ImageMessageView extends StatelessWidget {
),
],
),
if (!isMessageBySender && !(imageMessageConfig?.hideShareIcon ?? false)) iconButton,
if (!isMessageBySender && !(imageMessageConfig?.hideShareIcon ?? false))
iconButton,
],
);
}
Expand Down
5 changes: 3 additions & 2 deletions lib/src/widgets/send_message_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ class SendMessageWidget extends StatefulWidget {
/// Provides configuration for text field appearance.
final SendMessageConfiguration? sendMessageConfig;


/// Allow user to set custom text field.
final ReplyMessageWithReturnWidget? sendMessageBuilder;

Expand Down Expand Up @@ -115,7 +114,9 @@ class SendMessageWidgetState extends State<SendMessageWidget> {
child: Container(
height: MediaQuery.of(context).size.height /
((!kIsWeb && Platform.isIOS) ? 24 : 28),
color: chatListConfig.chatBackgroundConfig.backgroundColor ?? Colors.white,
color:
chatListConfig.chatBackgroundConfig.backgroundColor ??
Colors.white,
),
),
Padding(
Expand Down

0 comments on commit c7de8cb

Please sign in to comment.