removeAutoFieldEnhancement method
- {required AnkiMapping mapping,
- required Field field}
Removes a given mapping
's persisted auto enhancement for a given
field
.
Implementation
void removeAutoFieldEnhancement({
required AnkiMapping mapping,
required Field field,
}) async {
/// -1 is reserved for the auto enhancement.
mapping.enhancements![field.uniqueKey]!
.remove(AnkiMapping.autoModeSlotNumber);
_database.writeTxnSync(() {
_database.ankiMappings.putSync(mapping);
});
}