getModelList method

Future<List<String>> getModelList()

Get a list of models from the Anki background service that can be used for export.

Implementation

Future<List<String>> getModelList() async {
  try {
    Map<dynamic, dynamic> result =
        await methodChannel.invokeMethod('getModelList');
    List<String> models = result.values.toList().cast<String>();

    models.sort((a, b) => a.compareTo(b));
    return models;
  } catch (e) {
    showAnkidroidApiMessage();
    rethrow;
  }
}