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

Store a list of my own class? #8

Closed
sokryptk opened this issue Aug 1, 2019 · 6 comments
Closed

Store a list of my own class? #8

sokryptk opened this issue Aug 1, 2019 · 6 comments

Comments

@sokryptk
Copy link

sokryptk commented Aug 1, 2019

How do I store a list of my class myClass?

I get an error {
Cannot write unknown data type : myClass
}

Thanks.

@simc
Copy link
Member

simc commented Aug 1, 2019

You have to register a TypeAdapter. You can either create it yourself or use hive_generator to generate it automatically.

@aswinmohanme
Copy link

What command should I use to run the hive_generator ? Can't find it on the docs

@simc
Copy link
Member

simc commented Aug 1, 2019

Try flutter pub run build_runner build

@aswinmohanme
Copy link

I had to add build_runner package too, I will update the docs and send a PR :D

@simc
Copy link
Member

simc commented Aug 1, 2019

Oh thanks 👍👍

@simc
Copy link
Member

simc commented Aug 5, 2019

@krypticallusion if you need more help, just reopen the issue.

@simc simc closed this as completed Aug 5, 2019
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

3 participants