startWriteStream method
Implementation
@override
Future<SafWriteStreamInfo> startWriteStream(
String treeUri, String fileName, String mime,
{bool? overwrite}) async {
var session = _nextSession().toString();
var map = await methodChannel
.invokeMapMethod<String, dynamic>('startWriteStream', {
'treeUri': treeUri.toString(),
'session': session,
'fileName': fileName,
'mime': mime,
'overwrite': overwrite ?? false,
});
if (map == null) {
throw Exception('Unexpected empty response from `startWriteStream`');
}
final newFile = SafNewFile.fromMap(map);
return SafWriteStreamInfo(session, newFile);
}