Skip to content

Update Project , Switch from Isar to Hive_ce#236

Closed
Crucialjun wants to merge 3 commits intodroidconKE:mainfrom
Crucialjun:main
Closed

Update Project , Switch from Isar to Hive_ce#236
Crucialjun wants to merge 3 commits intodroidconKE:mainfrom
Crucialjun:main

Conversation

@Crucialjun
Copy link

  • 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<!--
    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

  • ✨ New feature (non-breaking change which adds functionality)
  • [X ] 🛠️ Bug fix (non-breaking change which fixes an issue)
  • ❌ Breaking change (fix or feature that would cause existing functionality to change)
  • [ X] 🧹 Code refactor
  • [ X] ✅ Build configuration change
  • 📝 Documentation
  • 🗑️ Chore

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

- 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.
Copilot AI review requested due to automatic review settings October 9, 2025 08:33
@Crucialjun Crucialjun changed the title chore: update dependencies in pubspec.yaml Update Project , Switch from Isar to Hive_ce Oct 9, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +27 to +31
Hive..init(dir.path)

// Register adapters

..registerAdapter(LocalFeedEntryAdapter())
Copy link

Copilot AI Oct 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing semicolon after Hive..init(dir.path) on line 27. The cascade operator chain should be properly terminated.

Copilot uses AI. Check for mistakes.
Comment on lines +31 to +36
await _googleSignIn.initialize(
clientId:
'602867001820-01m5er098dknofg7rdktcqj33atavm5c.apps.googleusercontent.com',
serverClientId:
'602867001820-01m5er098dknofg7rdktcqj33atavm5c.apps.googleusercontent.com',
);
Copy link

Copilot AI Oct 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hard-coded OAuth client IDs should be moved to environment variables or configuration files to avoid exposing sensitive credentials in source code.

Copilot uses AI. Check for mistakes.
@MillerAdulu MillerAdulu self-requested a review October 9, 2025 08:39
@MillerAdulu
Copy link
Contributor

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.

@Crucialjun
Copy link
Author

@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

@MillerAdulu
Copy link
Contributor

@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

  • Please share the excerpt of how full-text search is implemented in Hive?
  • It's possible to have freezed work well together with isar. Please try the following combination.
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.dev

Ideally, we would want to have the full-on migration happen if there's no other technologically feasible way.

cc @Crucialjun

@MillerAdulu
Copy link
Contributor

Superseded by #237

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.

3 participants