remove method

Future<bool> remove(
  1. String key
)

Removes an entry from persistent storage.

Implementation

Future<bool> remove(String key) async{
  final String prefixedKey = '$_prefix$key';
  _preferenceCache.remove(key);
  final bool isRemoved =await _store.remove(prefixedKey);

  if(isRemoved){
    _streamController.add(<String,dynamic>{
      'key':key,
      'value':null,
      'changed':true
    });
  }
  return isRemoved;
}