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

HiveError #2

Open
heronnie opened this issue Mar 9, 2023 · 2 comments
Open

HiveError #2

heronnie opened this issue Mar 9, 2023 · 2 comments

Comments

@heronnie
Copy link

heronnie commented Mar 9, 2023

HiveError (HiveError: You need to initialize Hive or provide a path to store the box.)
Screenshot 2023-03-09 at 09 28 15

@DevAgarwal2
Copy link

bro assign me i will give you he solution

@DevAgarwal2
Copy link

WidgetsFlutterBinding.ensureInitialized();
final dir =await path.getApplicationDocumentsDirectory();
Hive.init(dir.path);
just put this code in main.dart file

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

No branches or pull requests

2 participants