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