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