Update Project , Switch from Isar to Hive_ce#236
Update Project , Switch from Isar to Hive_ce#236Crucialjun wants to merge 3 commits intodroidconKE:mainfrom
Conversation
- Updated Firebase packages to latest versions: - firebase_analytics: ^12.0.2 - firebase_auth: ^6.1.0 - firebase_core: ^4.1.1 - firebase_crashlytics: ^5.0.2 - firebase_remote_config: ^6.0.2 - Updated go_router to ^16.2.4 - Updated google_sign_in to ^7.2.0 - Updated isar and isar_flutter_libs to ^3.1.0+1 - Updated share_plus to ^12.0.0 - Updated very_good_analysis to ^10.0.0 - Removed hosted specifications for isar packages - Cleaned up formatting in pubspec.yaml
- Updated LocalSession, LocalSpeaker, LocalSponsor, and LocalRoom models to use Hive annotations and types. - Removed Isar dependencies and replaced them with Hive equivalents in the DBRepository. - Adjusted methods in DBRepository to work with Hive boxes for data persistence. - Updated notification service to use serverId instead of session.id. - Changed user profile icon widget to use hive_ce_flutter. - Removed Isar related code from dependency injection setup. - Updated pubspec.yaml and pubspec.lock to reflect changes in dependencies, including Hive and removal of Isar. - Updated Flutter generated files for compatibility with new paths.
There was a problem hiding this comment.
Pull Request Overview
This PR updates dependencies in pubspec.yaml to their latest versions, primarily focusing on Firebase packages, database libraries, and development tools. The changes also include a migration from Isar database to Hive database implementation.
- Updated Firebase packages (analytics, auth, core, crashlytics, remote_config) to major version updates
- Migrated from Isar database to Hive CE for local data storage
- Updated various other dependencies including go_router, google_sign_in, and development tools
Reviewed Changes
Copilot reviewed 22 out of 23 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| pubspec.yaml | Updated all dependencies to latest versions and removed Isar hosted specifications |
| lib/common/repository/db_repository.dart | Complete migration from Isar to Hive CE database implementation |
| lib/common/data/models/local/*.dart | Updated all local model classes from Isar annotations to Hive annotations |
| lib/common/repository/auth_repository.dart | Updated Google Sign-In implementation to use new API patterns |
| android/settings.gradle | Updated Android build tools and plugin versions |
| android/app/build.gradle | Updated Android SDK versions and dependencies |
| Multiple other files | Updated imports and removed Isar-related code |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| Hive..init(dir.path) | ||
|
|
||
| // Register adapters | ||
|
|
||
| ..registerAdapter(LocalFeedEntryAdapter()) |
There was a problem hiding this comment.
Missing semicolon after Hive..init(dir.path) on line 27. The cascade operator chain should be properly terminated.
| await _googleSignIn.initialize( | ||
| clientId: | ||
| '602867001820-01m5er098dknofg7rdktcqj33atavm5c.apps.googleusercontent.com', | ||
| serverClientId: | ||
| '602867001820-01m5er098dknofg7rdktcqj33atavm5c.apps.googleusercontent.com', | ||
| ); |
There was a problem hiding this comment.
Hard-coded OAuth client IDs should be moved to environment variables or configuration files to avoid exposing sensitive credentials in source code.
|
Hi @Crucialjun, Thank you for your contribution. Concerning Isar, we have a community fork. As such, what would need to happen is the update to that package. Isar does play a key role in this project, and we would be against making such a radical shift just yet. One of the key reasons we have Isar is to support full-text search in the app, which Hive doesn't support just yet. So this radical shift will mean we have to re-examine every component of the app again. |
|
@MillerAdulu I'm using hive_ce and it has that feature , tried using the Isar community edition and it's breaking alot of things including not playing well with freezed |
isar_version: &isar_version 3.3.0-dev.3
dependencies:
freezed_annotation: ^3.1.0
isar_community:
version: *isar_version
hosted: https://pub.dev
isar_community_flutter_libs:
version: *isar_version
hosted: https://pub.dev
dev_dependencies:
freezed: ^3.2.3
build_runner: ^2.7.1
isar_community_generator:
version: *isar_version
hosted: https://pub.devIdeally, we would want to have the full-on migration happen if there's no other technologically feasible way. cc @Crucialjun |
|
Superseded by #237 |
Updated Firebase packages to latest versions:
Updated go_router to ^16.2.4
Updated google_sign_in to ^7.2.0
Updated isar and isar_flutter_libs to ^3.1.0+1
Updated share_plus to ^12.0.0
Updated very_good_analysis to ^10.0.0
Removed hosted specifications for isar packages
Cleaned up formatting in pubspec.yaml<!--
Thanks for contributing!
Provide a description of your changes below and a general summary in the title
Please look at the following checklist to ensure that your PR can be accepted quickly:
-->
Description
Type of Change
Test Changes on Device
You can download your APK from Firebase App Distribution once this PR builds successfully via the following link: https://appdistribution.firebase.dev/i/c796669942f8a811