checkAndCreateDirectory static method

dynamic checkAndCreateDirectory(
  1. String path
)

Implementation

static checkAndCreateDirectory(String path) async {
  final myDir = new Directory(path);
  myDir.exists().then((isThere) {
    if (!isThere) {
      myDir.create(recursive: true);
    }
  });
}