filterOnSave method
You can filter the saving content when it is saving.
Edit the value of save
and return.
Implementation
@override
@protected
@mustCallSuper
DynamicMap filterOnSave(DynamicMap save) {
var tmp = "";
for (final key in searchableKey) {
if (key.isEmpty || !save.containsKey(key)) {
continue;
}
final val = save.get(key, "");
tmp += val;
}
if (tmp.isEmpty) {
return super.filterOnSave(save);
}
save[searchValueKey] =
tmp.toLowerCase().splitByBigram().toMap((e) => MapEntry(e, true));
return super.filterOnSave(save);
}