The library annotations are a new lint and we have no need to specify a
custom library name anywhere. The JS annoation on the library also did
nothing, since it doesn't default to the library name in dart and only
modifies the prefix of functions if you pass in a custom name.
The sqflite_common_ffi I removed the upper constraint, which allows us
to use a newer version if our dart version is new enough, but I left it
at the original version because there is no need to require a higher
minimum currently.
This patch introduces a helper class for SQfLite encryption related operations.
Most matrix clients will encrypt their sqlite database at rest. Since
this is a quite fragmented task using the Flutter sqlite ecosystem, this
helper aims to simplify some more complex operations.
It in particular helps with the following tasks :
- loading the correct shared objects / dynamic libraries for sqlcipher
- check whether a database is encrypted
- migrate an unencrypted SQLite database to SQLCipher
- apply the cipher to a database while opening it and ensure it loads
This code is not exactly matrix related, though presumably any matrix
client will use parts of it.
Possible regressions :
- `package:sqlite3` became a direct dependency. As of now it already was a
transitive dependency of the SDK itself.
Signed-off-by: The one with the braid <info@braid.business>