setLastSelectedMapping method

Future<void> setLastSelectedMapping(
  1. AnkiMapping mapping,
  2. {bool notify = true}
)

Persist a new last selected model name. This is called when the user changes the selected model to map in the profiles menu.

Implementation

Future<void> setLastSelectedMapping(AnkiMapping mapping,
    {bool notify = true}) async {
  await _preferences.put('last_selected_mapping', mapping.label);
  if (notify) {
    notifyListeners();
  }
}