getDir method

Future<String> getDir(
  1. String dir
)

Implementation

Future<String> getDir(String dir) async {
  String path = "${(await getApplicationDocumentsDirectory()).path}/${dir}/";
  if (!(await Directory(path).exists())) Directory(path).create(recursive: true);
  return path;
}