A good documentation is crucial for a library. I started working on a new version and would love to get some help from you guys. If you have an idea of how to improve the docs, please comment below or create a pull request in the docs repository.
The new documentation also allows live code.
You can find it here: newdocs.hivedb.dev
Is it supposed to be down? I can't access the old or new docs.
Thanks for letting me know. The DNS configuration was wrong. Everything should work now again.
Ok.

So... I don't need anymore the PathProvider for iOS/Android? Or do I still need it? Unclear. What is that path/to/hive? Could you add a small example?
All of your data is stored in boxes.
If I were you I would replace it with like this:
All of your data is stored in boxes. After initialising Hive, you must open a box. Hive will automatically create it if doesn't exists.
Hive supports all primitive types,
I would replace that comma with a :, but that is a personal preference.
//Hive.init('sompePath') -> not needed in browser
That's nice, but you could add it inside a if (!kIsBrowser), for example, so the user gets to know that useful attribute - I only learned by looking at your code!
Video Tutorial
Ok...? But where is the next button? What should I read now? Why there is nothing selected in the left/menu bar? Hmmm... Looking in retrospect, where is the link in Open a Box to read more about how to open a box? And so on? I forgot there is more documentation to it.
Should I look the rest? I'm not sure if you changed everything or just the intro.
I just published a new version of hive_flutter which allows you to call Hive.initFlutter(). It takes care of everything and you don't have to provide a path. I just need to document it :P
Edit: I changed everything. I forked dartpad and let it run on the GCloud to allow running code with Hive.
Hive.initFlutter()
So.. you should probably mention "if you are using Flutter, click here, there is a better way"?
I just installed the new version of hive_flutter and I don't have the initFlutter method. Am I doing something wrong?
initFlutter() is an extension method. You need to import hive_flutter before you can use it.
Should we await initFlutter() before we open boxes and register adapters, etc or can we keep it sync?
Okay so you definitely have to await Hive.initFlutter()
Yes you have to await it. Dart does not provide a method to call async code synchronously.
I was just saying that because some of the other methods in Hive you don't have to wait for even if they have a return type of Future.
Oh yes, i'll make sure to mention it in the docs
There's an issue with this page: https://newdocs.hivedb.dev/#/basics/hive_in_flutter.
It uses Hive.simpleInit() which I believe was renamed to flutterInit(). It's causing an error in the DartPad.
It uses Hive.simpleInit() which I believe was renamed to flutterInit(). It's causing an error in the DartPad.
Thanks!
I noticed that you made a little tutorial in the documentation. Would you mind if I wrote one up @leisim?
I noticed that you made a little tutorial in the documentation.
I found the tutorial section in the BLOC docs by chance and I really like the idea. I used the same style and wrote a small tutorial to check if it fits the Hive docs.
Would you mind if I wrote one up
That would be amazing...
Yes you have to await it. Dart does not provide a method to call async code synchronously.
Doesn't Completer() do that?
@leisim MobX + Hive I wondering how they should be implemented together
Doesn't Completer() do that?
Completer makes synchronous code async.
MobX + Hive I wondering how they should be implemented together
I have never used MobX. If anyone has experience using it and wants to write a small tutorial, that would be great. I can enable MobX in the Hive DartPad to use live code.
I feel there should be a standard format for tutorials for the setup like adding dependencies and imports. The way we have it now, the dark mode switch says "Setup" and the contacts tutorial says "Dependencies" even though they cover the same topic. What are your thoughts @leisim?
@Reprevise I agree. I think it is even possible to "embed" markdown. We could reuse the same template for each page.
What headings should there be? I'm thinking "Dependencies", "Initialization", the tutorial, then "Source Code" at the end. I don't know much more that we can standardize to a format.
"Dependencies", "Initialization", the tutorial, then "Source Code"
:+1:
Would you show the live example with the complete source code at the beginning or end? I like that the reader can test the app before he reads the tutorial but he also sees all the source code...
It can go either way but yeah that would work best.
New order:
Perfect 馃憤