Is it possible to clear cache data of an app (ex. youtube) using my Flutter app. I'm trying to do something like:
var app = await DeviceApps.getApp('com.google.android.youtube');
var dir=Directory(app?.dataDir);
dir.deleteSync(recursive: true);
But I got: Unhandled Exception: FileSystemException: Deletion failed, path = '/data/user/0/com.google.android.youtube' (OS Error: No such file or directory, errno = 2)