setQuickAction method

void setQuickAction(
  1. {required AnkiMapping mapping,
  2. required int slotNumber,
  3. required QuickAction quickAction}
)

Updates a given mapping's persisted action for a given slotNumber.

Implementation

void setQuickAction(
    {required AnkiMapping mapping,
    required int slotNumber,
    required QuickAction quickAction}) async {
  mapping.actions![slotNumber] = quickAction.uniqueKey;

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

  notifyListeners();
}