delete method

Future<bool> delete(
  1. String key
)

Delete data with custom key

Implementation

Future<bool> delete(String key) async {
  return SharedPreferences.getInstance().then((sharedPreferences) {
    return sharedPreferences.remove(key);
  }).catchError((error) {
    print('FlutterPlusUtils.delete -> $error');
  });
}