isar / isar/hive

Fail to initialize Hive 4.0.0 for Flutter Web?

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

Description

Hi all,

what is the new way to initialize Hive 4.0.0 for Flutter web?

` final dir = await getApplicationDocumentsDirectory();
Hive.defaultDirectory = dir.path;
`

fails because Path_Provider is not available on browsers. There does not seem any other init method. Does anyone know?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the reported initialization failure in a Flutter Web application using the shown getApplicationDocumentsDirectory and Hive.defaultDirectory calls. Read Hive 4.0.0's initialization guidance and verify what a browser-compatible setup requires; done means Hive initializes successfully in Flutter Web without path_provider.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart, flutter
Domain
databases, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.