iosCreateFolder method
Future<AssetPathEntity?>
iosCreateFolder(
- String name,
- bool isRoot,
- AssetPathEntity? parent
inherited
Implementation
Future<AssetPathEntity?> iosCreateFolder(
String name,
bool isRoot,
AssetPathEntity? parent,
) async {
final Map<String, dynamic> map = <String, dynamic>{
'name': name,
'isRoot': isRoot,
};
if (!isRoot && parent != null) {
map['folderId'] = parent.id;
}
final Map<dynamic, dynamic>? result = await _channel.invokeMethod(
PMConstants.mCreateFolder,
map,
);
if (result == null) {
return null;
}
if (result['errorMsg'] != null) {
return null;
}
return AssetPathEntity.fromId(result['id'] as String, albumType: 2);
}