files static method
Sends multiple files to other apps.
Implementation
static Future<void> files(
String title, Map<String, List<int>> files, String mimeType,
{String text = ''}) async {
Map argsMap = <String, dynamic>{
'title': title,
'names': files.entries.toList().map((x) => x.key).toList(),
'mimeType': mimeType,
'text': text
};
final tempDir = await getTemporaryDirectory();
for (var entry in files.entries) {
final file = await File('${tempDir.path}/${entry.key}').create();
await file.writeAsBytes(entry.value);
}
_channel.invokeMethod('files', argsMap);
}