Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions example/lib/example_two/example_two_chat_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import '../values/colors.dart';
import '../values/borders.dart';
import '../values/icons.dart';
import '../values/images.dart';
import '../widgets/custom_chat_bar.dart';
import '../widgets/reply_message_tile.dart';
import '../widgets/wp_custom_chat_bar.dart';

class ExampleTwoChatScreen extends StatefulWidget {
const ExampleTwoChatScreen({required this.chat, super.key});
Expand Down Expand Up @@ -175,7 +175,7 @@ class _ExampleTwoChatScreenState extends State<ExampleTwoChatScreen> {
),
chatBackgroundConfig: ChatBackgroundConfiguration(
backgroundColor: AppColors.uiTwoBackground,
backgroundImage: AppImages.wpChatBackground,
backgroundImage: AppImages.uiTwoChatBackground,
groupSeparatorBuilder: (separator) => _customSeparator(separator),
),
chatBubbleConfig: ChatBubbleConfiguration(
Expand Down Expand Up @@ -282,7 +282,7 @@ class _ExampleTwoChatScreenState extends State<ExampleTwoChatScreen> {
onLeftSwipe: null,
onRightSwipe: null,
),
sendMessageBuilder: (replyMessage) => WpCustomChatBar(
sendMessageBuilder: (replyMessage) => CustomChatBar(
chatController: _chatController,
replyMessage: replyMessage ?? const ReplyMessage(),
onAttachPressed: () => ScaffoldMessenger.of(context).showSnackBar(
Expand Down
2 changes: 1 addition & 1 deletion example/lib/values/images.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
class AppImages {
static const String wpChatBackground = "assets/images/chat_background.png";
static const String uiTwoChatBackground = "assets/images/chat_background.png";
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import 'package:audio_waveforms/audio_waveforms.dart';
import '../../values/colors.dart';
import '../../values/icons.dart';

class WpCustomChatBar extends StatefulWidget {
const WpCustomChatBar({
class CustomChatBar extends StatefulWidget {
const CustomChatBar({
required this.chatController,
required this.replyMessage,
this.onAttachPressed,
Expand All @@ -22,10 +22,10 @@ class WpCustomChatBar extends StatefulWidget {
final VoidCallback? onAttachPressed;

@override
State<WpCustomChatBar> createState() => _WpCustomChatBarState();
State<CustomChatBar> createState() => _CustomChatBarState();
}

class _WpCustomChatBarState extends State<WpCustomChatBar> {
class _CustomChatBarState extends State<CustomChatBar> {
RecorderController? controller;
late ReplyMessage? _replyMessage = widget.replyMessage;
final voiceRecordingConfig = const VoiceRecordingConfiguration();
Expand Down Expand Up @@ -67,7 +67,10 @@ class _WpCustomChatBarState extends State<WpCustomChatBar> {
padding: const EdgeInsets.fromLTRB(8, 8, 7.5, 7.5),
decoration: const BoxDecoration(
border: Border(
left: BorderSide(color: AppColors.uiTwoReplyLineColor, width: 4),
left: BorderSide(
color: AppColors.uiTwoReplyLineColor,
width: 4,
),
),
),
child: Row(
Expand Down Expand Up @@ -258,10 +261,10 @@ class _WpCustomChatBarState extends State<WpCustomChatBar> {
onPressed: _sendMessage,
padding: EdgeInsets.zero,
style: IconButton.styleFrom(
backgroundColor: AppColors.uiTwoGreen,
backgroundColor:
AppColors.uiTwoGreen,
),
icon:
SvgPicture.asset(AppIcons.send),
icon: SvgPicture.asset(AppIcons.send),
),
),
]
Expand Down Expand Up @@ -303,8 +306,8 @@ class _WpCustomChatBarState extends State<WpCustomChatBar> {
child: IconButton(
onPressed: _recordOrStop,
padding: EdgeInsets.zero,
icon: SvgPicture.asset(
AppIcons.mic),
icon:
SvgPicture.asset(AppIcons.mic),
),
),
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ class AutoAnimateSliverListState<T> extends State<AutoAnimateSliverList<T>>
void dispose() {
_updateSubscription?.cancel();
_updateSubscription = null;
_controller.disposeAnimations();
super.dispose();
}
}