Skip to content

Use of Android OS SQLite library #1626

Answered by simolus3
pourqavam asked this question in Q&A
Discussion options

You must be logged in to vote

I got this error:

You can't use dart:ffi (or a NativeDatabase) to access the sqlite3 library that comes with the operating system (well, at least not since Android 7). It's possible on iOS, but on Android you'd have to go through the Java APIs. Even when using drift, you can use the moor_flutter package to use sqflite as a drift backend. sqflite uses the Java APIs internally.

Is there any performance benefits to use the OS library?

I don't see why there should be a performance benefit. You binary size will certainly reduce (by around ~700 KiB when using app bundles). But when accessing the OS library through platform channels (which is necessary on Android), the overhead of serializat…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by pourqavam
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants