save method
Implementation
Future<void> save() async {
if (customSave == null) {
assert(key != null);
final toSave = serialize(_value);
final pref = await SharedPreferences.getInstance();
await pref.setString(key!, toSave);
} else {
await customSave!(_value);
}
}