Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(drift-database): Shifted from shared prefs to drift for Exercises #453

Merged
merged 25 commits into from
Jan 12, 2024

Conversation

Abhisheksainii
Copy link
Contributor

Description (Proposed Changes)

  • Added sqlite database(via drift) to cache the exercises
  • shifted from shared prefs to drift.

Link to the issue :

Tests

Please make sure to add tests when implementing new features.

Checklist

Please check that the PR fulfills all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

  • Set a 100 character limit in your editor/IDE to avoid white space diffs in the PR
  • Tests for the changes have been added (for bug fixes / features)
  • Added yourself to AUTHORS.md
  • Updated/added relevant documentation (doc comments with ///).
  • Added relevant reviewers.

rolandgeider and others added 24 commits November 16, 2023 21:36
This makes it easier to understand the diffs
This is now separated into individual tables and methods so that they can be
tested separately
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
This wasn't really needed, we can just filter exercises by their variationID
We now dependency inject the database for the whole exercise provider,
this makes our lives a bit easier
# Conflicts:
#	lib/main.dart
#	lib/providers/exercises.dart
#	lib/widgets/workouts/day.dart
#	pubspec.lock
#	pubspec.yaml
# Conflicts:
#	lib/widgets/add_exercise/steps/step2variations.dart
#	pubspec.lock
The documents folder is suggested for files that can't be generated by the
application itself
This should be expanded later to allow to re-fetch all available exercises, etc.
@rolandgeider rolandgeider merged commit 5a1da39 into master Jan 12, 2024
4 checks passed
@rolandgeider rolandgeider deleted the feat/data-persistence branch January 12, 2024 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants