createDir function
Implementation
Future<Directory?> createDir(Directory? parent, String dirName) async {
if (parent == null || isEmpty(dirName)) return null;
var childDir =
Directory(parent.absolute.path + Platform.pathSeparator + dirName);
if (!await childDir.exists()) await childDir.create();
return childDir;
}