getFieldList method

Future<List<String>> getFieldList(
  1. String model
)

Get a list of field names for a given model name in Anki. This function assumes that the model name can be found in getDecks and is valid.

Implementation

Future<List<String>> getFieldList(String model) async {
  try {
    List<String> fields = List<String>.from(
      await methodChannel.invokeMethod(
        'getFieldList',
        <String, dynamic>{
          'model': model,
        },
      ),
    );

    return fields;
  } catch (e) {
    showAnkidroidApiMessage();
    rethrow;
  }
}