write method
Write cookie value
with the given key
to the storage.
Implementation
@override
Future<void> write(String key, Object value) async {
// Ensure _prefs has been initialized before using it
_prefs ??= await SharedPreferences.getInstance();
_prefs!.setString(_keyPrefix + key, value.toString());
}