Skip to content

Commit

Permalink
fix: 🐛 the audio record cancelIcon is overflowed pixel
Browse files Browse the repository at this point in the history
  • Loading branch information
vatsaltanna committed Aug 1, 2024
1 parent 4de800d commit 46cc791
Showing 1 changed file with 24 additions and 23 deletions.
47 changes: 24 additions & 23 deletions lib/src/widgets/chatui_textfield.dart
Original file line number Diff line number Diff line change
Expand Up @@ -147,29 +147,30 @@ class _ChatUITextFieldState extends State<ChatUITextField> {
return Row(
children: [
if (isRecordingValue && controller != null && !kIsWeb)
AudioWaveforms(
size: Size(
MediaQuery.of(context).size.width *
(cancelRecordConfiguration == null ? 0.75 : 0.65),
50),
recorderController: controller!,
margin: voiceRecordingConfig?.margin,
padding: voiceRecordingConfig?.padding ??
EdgeInsets.symmetric(
horizontal: cancelRecordConfiguration == null ? 8 : 5,
),
decoration: voiceRecordingConfig?.decoration ??
BoxDecoration(
color: voiceRecordingConfig?.backgroundColor,
borderRadius: BorderRadius.circular(12.0),
),
waveStyle: voiceRecordingConfig?.waveStyle ??
WaveStyle(
extendWaveform: true,
showMiddleLine: false,
waveColor: voiceRecordingConfig?.waveStyle?.waveColor ??
Colors.black,
),
Expanded(
child: AudioWaveforms(
size: const Size(
double.maxFinite,
50),
recorderController: controller!,
margin: voiceRecordingConfig?.margin,
padding: voiceRecordingConfig?.padding ??
EdgeInsets.symmetric(
horizontal: cancelRecordConfiguration == null ? 8 : 5,
),
decoration: voiceRecordingConfig?.decoration ??
BoxDecoration(
color: voiceRecordingConfig?.backgroundColor,
borderRadius: BorderRadius.circular(12.0),
),
waveStyle: voiceRecordingConfig?.waveStyle ??
WaveStyle(
extendWaveform: true,
showMiddleLine: false,
waveColor: voiceRecordingConfig?.waveStyle?.waveColor ??
Colors.black,
),
),
)
else
Expanded(
Expand Down

0 comments on commit 46cc791

Please sign in to comment.