|
|
|
|
@ -12,6 +12,7 @@ import 'package:mohem_flutter_app/classes/utils.dart';
|
|
|
|
|
import 'package:mohem_flutter_app/extensions/int_extensions.dart';
|
|
|
|
|
import 'package:mohem_flutter_app/extensions/string_extensions.dart';
|
|
|
|
|
import 'package:mohem_flutter_app/extensions/widget_extensions.dart';
|
|
|
|
|
import 'package:mohem_flutter_app/main.dart';
|
|
|
|
|
import 'package:mohem_flutter_app/models/chat/get_single_user_chat_list_model.dart';
|
|
|
|
|
import 'package:mohem_flutter_app/provider/chat_provider_model.dart';
|
|
|
|
|
import 'package:mohem_flutter_app/ui/chat/chat_full_image_preview.dart';
|
|
|
|
|
@ -92,8 +93,14 @@ class ChatBubble extends StatelessWidget {
|
|
|
|
|
Uint8List encodedString = await ChatApiClient().downloadURL(fileName: data.contant!, fileTypeDescription: provider.getFileTypeDescription(data.fileTypeResponse!.fileTypeName ?? ""));
|
|
|
|
|
// try {
|
|
|
|
|
File sFile = await provider.downChatVoice(encodedString, data.fileTypeResponse!.fileTypeName ?? "", data);
|
|
|
|
|
if(sFile.path.isEmpty){
|
|
|
|
|
logger.d("Path Is Emptyyyyyyy");
|
|
|
|
|
}else{
|
|
|
|
|
logger.d("Path Exsists");
|
|
|
|
|
}
|
|
|
|
|
data.voice = sFile;
|
|
|
|
|
if (Platform.isIOS) {
|
|
|
|
|
logger.d("isIOS");
|
|
|
|
|
Duration? duration = await data.voiceController!.setAudioSource(MyCustomStream(data.voice!.readAsBytesSync()));
|
|
|
|
|
await data.voiceController!.seek(duration);
|
|
|
|
|
await data.voiceController!.setLoopMode(LoopMode.off);
|
|
|
|
|
|