add method
Adds a unique value to the end. Removes is before if it pre-existed.
Implementation
Future<void> add(String key, String string) async {
final List<String> value = getAll(key);
value.remove(string);
value.add(string);
final int? maxLength = _maxLengths[key];
if (maxLength != null) {
while (value.length > maxLength) {
value.removeAt(0);
}
}
await _getBox().put(key, value);
localDatabase.notifyListeners();
}