getAppApkDirectory static method
Implementation
static Future<Directory> getAppApkDirectory() async {
Directory tempDir;
if (Platform.isIOS) {
tempDir = await getApplicationDocumentsDirectory();
} else {
tempDir = (await getExternalStorageDirectory())!;
}
String tempPath = tempDir.path + "/apk";
Directory file = new Directory(tempPath);
if (!file.existsSync()) {
file.createSync(recursive: true);
}
return file;
}