createFolder method
name
The folder name.
parent
is nullable, if it's null, the folder will be create in root. If isn't null, the AssetPathEntity.albumType must be 2.
The only exception, Recent can be specified, but the same as null.
Implementation
Future<AssetPathEntity?> createFolder(
String name, {
AssetPathEntity? parent,
}) async {
if (parent == null || parent.isAll) {
return _plugin.iosCreateFolder(name, true, null);
} else {
if (parent.albumType == 1) {
assert(parent.albumType == 1, "The folder can't add");
return null;
}
return _plugin.iosCreateFolder(name, false, parent);
}
}