flutter_settings_screens icon indicating copy to clipboard operation
flutter_settings_screens copied to clipboard

What's the purpose of defaultValue on setX()?

Open alevinetx opened this issue 3 years ago • 0 comments

version: 0.3.2-null-safety

In CacheProvider, all setX methods have an optional parameter for defaultValue.

 Future<void> setInt(String key, int? value, {int? defaultValue});
 Future<void> setString(String key, String? value, {String? defaultValue});
 Future<void> setDouble(String key, double? value, {double? defaultValue});
 Future<void> setBool(String key, bool? value, {bool? defaultValue});

Is this intentional, instead of placing them on getX? If so, what's the intended purpose? I don't see it being used in the provided example.

Thank you !

alevinetx avatar May 22 '22 10:05 alevinetx