sendFileMessage<T, F> method

Future<T> sendFileMessage<T, F>(
  1. Map<String, dynamic> params
)

Implementation

Future<T> sendFileMessage<T, F>(Map<String, dynamic> params) async {
  String? mimeType = mime(Path.basename(params['fileName']));
  final fileContent = generateDartListObject(params['fileContent']);
  params['file'] = html.File(fileContent, params['fileName'] as String, {'type': mimeType});
  return await sendMessage<T, F>(type: 'file', params: params);
}