flutter_ankidroid 0.1.0 copy "flutter_ankidroid: ^0.1.0" to clipboard
flutter_ankidroid: ^0.1.0 copied to clipboard

outdated

A flutter wrapper over the java AnkiDroid API.

flutter_ankidroid #

This plugin is a flutter wrapper over the java AnkiDroid API.

Before Starting #

1. Edit your project's android/app/build.gradle #

Add repositories { maven { url "https://jitpack.io" } } to the end of the file.

2. Edit your project's android/app/src/main/AndroidManifest.xml #

In the opening <Application...> tag, remove the line android:label="..."

Usage #

Create an Ankidroid instance with its own isolate by running this:

final anki = await Ankidroid.createAnkiIsolate();

Then you could do:

final decks = await widget.anki.deckList().asValue();
if (decks != null) {
    print(decks);
} else {
    print(await widget.anki.deckList().asError());
}

Or you can go ahead and use any of the following methods.

anki.addNote(modelId, deckId, fields, tags)
anki.addNotes(modelId, deckId, fieldsList, tagsList)
anki.addMediaFromUri(fileUri, preferredName, mimeType)
anki.findDuplicateNotesWithKey(mid, key)
anki.findDuplicateNotesWithKeys(mid, keys)
anki.getNoteCount(mid)
anki.updateNoteTags(noteId, tags)
anki.updateNoteFields(noteId, fields)
anki.getNote(noteId)
anki.previewNewNote(mid, flds)
anki.addNewBasicModel(name)
anki.addNewBasic2Model(name)
anki.addNewCustomModel(name, fields, cards, qfmt, afmt, css, did, sortf)
anki.currentModelId()
anki.getFieldList(modelId)
anki.modelList()
anki.getModelList(minNumFields)
anki.getModelName(mid)
anki.addNewDeck(deckName)
anki.selectedDeckName()
anki.deckList()
anki.getDeckName(did)
anki.apiHostSpecVersion()
1
likes
0
points
33
downloads

Publisher

unverified uploader

Weekly Downloads

A flutter wrapper over the java AnkiDroid API.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

async, flutter, flutter_isolate, plugin_platform_interface

More

Packages that depend on flutter_ankidroid

Packages that implement flutter_ankidroid