downloadsDir property

Future<Directory?> get downloadsDir

Implementation

static Future<Directory?> get downloadsDir async {
  Directory downloadsDirectory;
  try {
    if (Platform.isIOS) {
      downloadsDirectory = await getLibraryDirectory();
    } else {
      downloadsDirectory = await getApplicationSupportDirectory();
    }

    return downloadsDirectory;
  } on PlatformException {
    return null;
  }
}