sendFiles function
Future<void>
sendFiles(
- List<
XFile> files, - TUIChatSeparateViewModel model,
- V2TimConversation conversation,
- ConvType conversationType,
- BuildContext context,
Implementation
Future<void> sendFiles(
List<XFile> files,
TUIChatSeparateViewModel model,
V2TimConversation conversation,
ConvType conversationType,
BuildContext context) async {
for (final file in files) {
final fileName = file.name;
final filePath = file.path;
await MessageUtils.handleMessageError(
model.sendFileMessage(
fileName: fileName,
filePath: filePath,
convID: _getConvID(conversation),
convType: conversationType),
context);
await Future.delayed(const Duration(microseconds: 300));
}
}