isar / isar/hive

Hive Generator incompatible with Flutter 3.35.1 (Dart 3.7+) due to outdated dependencies

Open
#1,334 6 comments 0 reactions 0 assignees View on GitHub
Dominant language
Dart
Stars
4.4k
Forks
449
PR merge metrics
No merged PRs in 30d

Description

## Description
When upgrading Flutter SDK to **3.35.1** (Dart 3.9.0), we are getting dependency resolution issues because `hive_generator` is pinned to outdated tooling.

**Our current dependencies:**
hive: ^2.2.3
hive_flutter: ^1.1.0
hive_generator: ^2.0.1

**hive_generator's pubspec uses:**

environment:
sdk: ">=2.6.0 <3.0.0"

dependencies:
build: ^1.1.6
source_gen: ^0.9.4+4
hive: ">=1.3.0 <2.0.0"
analyzer: ">=0.36.0 <0.40.0"
dartx: ^0.2.0

dev_dependencies:
test: ^1.6.4
build_test: any
build_runner: any
pedantic: '1.7.0'

**But Flutter 3.35.1 requires:**
build_runner ^2.7.0 → needs build ^3.x
freezed/json_serializable → need source_gen ^3.x
analyzer >=6.x

**This creates conflicts such as:**
Because mockito >=5.4.3 <5.4.5 depends on source_gen ^1.0.0 and
freezed >=3.2.0 depends on source_gen ^3.0.0,
mockito >=5.4.3 <5.4.5 is incompatible with freezed >=3.2.0.

**Impact**
Projects using Hive cannot upgrade to Flutter 3.35.1 / Dart 3.7+.
hive_generator is essentially blocked from being used in modern projects.

Contributor guide

No contributing guide indexed for this repository

Research direction

Review the hive_generator pubspec and its dependency constraints first, focusing on the Dart SDK, build, source_gen, analyzer, and Hive requirements described here. Reproduce dependency resolution with Flutter 3.35.1 and current related packages; done means hive_generator can resolve and be used in modern Dart projects without the reported conflicts.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart, flutter
Domain
build-system, databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.