isar / isar/hive

Drawbacks to HiveList

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

Description

I'm Currently using Hive in conjunction with Provider, with great success. First, is there a single object version of HiveList? Secondly, is there any reason not to store List in a Provider as a HiveList, rather than a regular List?

**Code sample**
```dart
//Question 1
@HiveType(typeId: 53)
class ReviewCard extends ContentCard {
@override
@HiveField(0)
final bool hidden;
//I want to store a single Hive object reference here, not a list
@HiveField(1)
final HiveList word;

ReviewCard(
this.hidden, {
@required this.word,
});
}

//Question 2
class Words extends ChangeNotifier {
String _boxName = 'wordsBox';
//how i'm considering storing my list
HiveList _words;
}
```

**Version**
- Platform: Android
- Flutter version: [1.12.13]
- Hive version: [1.4.1+1]
-hive_flutter: [0.3.0+2]
-provider: [4.0.4]

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.