|
|
|
|
@ -118,7 +118,11 @@ class ChatBubble extends StatelessWidget {
|
|
|
|
|
).paddingOnly(bottom: 4),
|
|
|
|
|
if (fileTypeID == 13)
|
|
|
|
|
currentWaveBubble(context, cItem).onPress(() {
|
|
|
|
|
if(cItem.voiceController!.playerState == PlayerState.playing){
|
|
|
|
|
data.stopPlaying(context, data: cItem);
|
|
|
|
|
}else{
|
|
|
|
|
data.playVoice(context, data: cItem);
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
else
|
|
|
|
|
Row(
|
|
|
|
|
@ -203,7 +207,8 @@ class ChatBubble extends StatelessWidget {
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
).paddingOnly(bottom: 7).onPress(() {}),
|
|
|
|
|
).paddingOnly(bottom: 7).onPress(() {
|
|
|
|
|
}),
|
|
|
|
|
if (fileTypeID == 12 || fileTypeID == 4 || fileTypeID == 3)
|
|
|
|
|
ClipRRect(
|
|
|
|
|
borderRadius: BorderRadius.circular(5.0),
|
|
|
|
|
@ -221,7 +226,12 @@ class ChatBubble extends StatelessWidget {
|
|
|
|
|
).paddingOnly(bottom: 4),
|
|
|
|
|
if (fileTypeID == 13)
|
|
|
|
|
recipetWaveBubble(context, cItem).onPress(() {
|
|
|
|
|
if(cItem.voiceController!.playerState == PlayerState.playing){
|
|
|
|
|
data.stopPlaying(context, data: cItem);
|
|
|
|
|
}else{
|
|
|
|
|
data.playVoice(context, data: cItem);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
})
|
|
|
|
|
else
|
|
|
|
|
Row(
|
|
|
|
|
@ -310,8 +320,8 @@ class ChatBubble extends StatelessWidget {
|
|
|
|
|
child: Row(
|
|
|
|
|
mainAxisSize: MainAxisSize.max,
|
|
|
|
|
children: [
|
|
|
|
|
const Icon(
|
|
|
|
|
Icons.play_arrow,
|
|
|
|
|
Icon(
|
|
|
|
|
data.voiceController!.playerState == PlayerState.playing ? Icons.stop_circle : Icons.play_arrow,
|
|
|
|
|
color: MyColors.lightGreenColor,
|
|
|
|
|
).paddingAll(10),
|
|
|
|
|
AudioFileWaveforms(
|
|
|
|
|
@ -338,7 +348,6 @@ class ChatBubble extends StatelessWidget {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Widget recipetWaveBubble(BuildContext context, SingleUserChatModel data) {
|
|
|
|
|
PlayerController repController = PlayerController();
|
|
|
|
|
return Container(
|
|
|
|
|
margin: const EdgeInsets.all(0),
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
@ -359,8 +368,8 @@ class ChatBubble extends StatelessWidget {
|
|
|
|
|
child: Row(
|
|
|
|
|
mainAxisSize: MainAxisSize.max,
|
|
|
|
|
children: [
|
|
|
|
|
const Icon(
|
|
|
|
|
Icons.play_arrow,
|
|
|
|
|
Icon(
|
|
|
|
|
data.voiceController!.playerState == PlayerState.playing ? Icons.stop_circle : Icons.play_arrow,
|
|
|
|
|
color: MyColors.white,
|
|
|
|
|
).paddingAll(10),
|
|
|
|
|
AudioFileWaveforms(
|
|
|
|
|
|