sqlite3_flutter_libs 0.6.0+eol no longer bundles the native SQLite
library correctly on newer Android toolchains, causing a
DriftRemoteException on startup (dlopen failed: libsqlite3.so not found).
Replace it with drift_flutter which is the current recommended package
for providing native SQLite to drift databases. Also suppress the
StackFrame assertion error from the stack_trace package that was masking
the real error.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Not setting the "await" was causing the method to be run asynchronously which means
that sometimes these would get called several times for the same exercise, which in
turn would cause exercises to be written several times to the local db, polluting the
exercise list, etc. etc.
We increase the schemaVersion of the database because this causes all the cache tables
to be dropped and re-created
This allows the user to use the system settings as well, and not always force
light or dark mode in the app. Also move the logic to the UserProvider and
do some light refactoring.
handleUpdateExerciseFromApi should now be faster and save up on some requests.
Ideally we would pre-populate the database with all exercises on first run, or
even just ship it pre-filled