removeFieldEnhancement method

void removeFieldEnhancement(
  1. {required AnkiMapping mapping,
  2. required Field field,
  3. required int slotNumber}
)

Removes a given mapping's persisted enhancement for a given field and slotNumber.

Implementation

void removeFieldEnhancement({
  required AnkiMapping mapping,
  required Field field,
  required int slotNumber,
}) async {
  mapping.enhancements![field.uniqueKey]!.remove(slotNumber);

  _database.writeTxnSync(() {
    _database.ankiMappings.putSync(mapping);
  });
}