From 1ac8c311377bcd83b69ab3092cb129a57169dbf7 Mon Sep 17 00:00:00 2001 From: Pontus Andersson Date: Sun, 21 Apr 2024 08:32:48 +0200 Subject: [PATCH] Update initialization in README.md The README.md file shows the old way of initializing the Hive storage setting the default directory path. This PR fixes so that it uses the updated `init` method to initialize Hive. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index b046235d1..fd2cc6136 100644 --- a/README.md +++ b/README.md @@ -59,7 +59,7 @@ Hive needs a place to call home. Using `path_provider` we can find a valid direc void main() async { WidgetsFlutterBinding.ensureInitialized(); final dir = await getApplicationDocumentsDirectory(); - Hive.defaultDirectory = dir.path; + Hive.init(dir.path); // ... }