sqlite3_flutter_libs 0.4.1
sqlite3_flutter_libs: ^0.4.1 copied to clipboard

Flutter plugin to include native sqlite3 libraries with your app

sqlite3_flutter_libs #

This package intentionally contains no Dart code. Flutter apps depending on this package will contain native sqlite3 libraries.

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.

19
likes
120
pub points
96%
popularity

Flutter plugin to include native sqlite3 libraries with your app

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

Uploader

simolus3@gmail.com

License

MIT (LICENSE)

Dependencies

flutter

More

Packages that depend on sqlite3_flutter_libs