getTemporaryDir static method

Future<String> getTemporaryDir(
  1. String dir
)

Implementation

static Future<String> getTemporaryDir(String dir) async {
  final Directory tempDirectory = await getTemporaryDirectory();
  final String dirPath = '${tempDirectory.path}/$dir';
  final Directory file = Directory(dirPath);
  if (!file.existsSync()) {
    file.createSync(recursive: true);
  }
  return dirPath;
}