getMatchingSharedPrefKeys function

List<String> getMatchingSharedPrefKeys(
  1. String key
)

Returns List of Keys that matches with given Key

Implementation

List<String> getMatchingSharedPrefKeys(String key) {
  List<String> keys = [];

  sharedPreferences.getKeys().forEach((element) {
    if (element.contains(key)) {
      keys.add(element);
    }
  });

  return keys;
}