createSubDirectory method

Future<String> createSubDirectory(
  1. String path
)

Implementation

Future<String> createSubDirectory(String path) async {
  try {
    final newDirectory = await _fileDirectory(path);

    if (!await newDirectory.exists()) {
      await newDirectory.create();
    }
    return newDirectory.path;
  } catch (e) {
    throw Exception(e);
  }
}