We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e37e9f3 commit a8daf0aCopy full SHA for a8daf0a
1 file changed
lib/presentation/prefs_dialog.dart
@@ -22,6 +22,7 @@ class PreferencesDialog extends StatefulWidget {
22
}
23
24
class _PreferencesDialogState extends State<PreferencesDialog> {
25
+ /// use local state instead of directly accessing shared preferences since we write the settings asynchronously without waiting
26
late bool skipEmpty;
27
late bool useCache;
28
late bool followSymlinks;
@@ -54,7 +55,7 @@ class _PreferencesDialogState extends State<PreferencesDialog> {
54
55
SwitchListTile(
56
title: const Text('Use cache'),
57
subtitle: const Text('fdupes 2.3.0+', softWrap: false),
- value: widget.sharedPreferences.getBool('usecache') ?? false,
58
+ value: useCache,
59
onChanged: (value) {
60
setState(() {
61
useCache = value;
0 commit comments