Skip to content

Commit

Permalink
修复iOS清理缓存的权限问题
Browse files Browse the repository at this point in the history
  • Loading branch information
Zhoucheng133 committed Mar 11, 2024
1 parent 3a6fd64 commit b282e4d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/views/settingsView.dart
Original file line number Diff line number Diff line change
Expand Up @@ -198,9 +198,11 @@ class _settingsViewState extends State<settingsView> {
Future<void> clearController() async {
final cacheDir = await getTemporaryDirectory();
if (cacheDir.existsSync()) {
cacheDir.deleteSync(recursive: true);
cacheSize=0;
try {
cacheDir.deleteSync(recursive: true);
} catch (_) {}
}
getCacheSize();
}

Future<void> clearCache(BuildContext context) async {
Expand Down

0 comments on commit b282e4d

Please sign in to comment.