sqlite3_flutter_libs

This package intentionally contains no Dart code. Flutter apps depending on this package will contain native sqlite3 libraries on Android, iOS and macOS.

For more details on how to actually use this package in a Flutter app, see sqlite3.

Notes on Android

Included platforms

Note that, on Android, this library will bundle sqlite3 for all of the following platforms:

  • arm64-v8a
  • armeabi-v7a
  • x86
  • x86_64

If you don't intend to release to 32-bit x86 devices, you'll need to apply a filter in your build.gradle:

android {
    defaultConfig {
        ndk {
            abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86_64'
        }
    }
}

Problems on Android 6

There appears to be a problem when loading native libraries on Android 6 (see this issue). If you're seeing those crashes, you could try setting android.bundle.enableUncompressedNativeLibs=false in your gradle.properties file. Be aware that this increases the size of your application when installed.

Alternatively, you can use the applyWorkaroundToOpenSqlite3OnOldAndroidVersions method from this library. It will try to open sqlite3 in Java, which seems to work more reliably. After sqlite3 has been loaded from Java, we can open it in Dart too.

Providing a temporary path

If you have complex queries failing with a SQLITE_IOERR_GETTEMPPATH 6410 error, you could try to explicitly set the temporary path used by sqlite3. This comment contains a snippet to do just that.

Libraries

sqlite3_flutter_libs
This library contains a workaround neccessary to open dynamic libraries on old Android versions (6.0.1). [...]