hive
hive copied to clipboard
Lightweight and blazing fast key-value database written in pure Dart.
**Question** How can i serialize HiveList with json_serializable **Code sample** ```dart import 'package:farmy_mobile/services/database/db_models/anomalies_models/anomaly_comment.dart'; import 'package:farmy_mobile/services/database/db_models/anomalies_models/anomaly_images.dart'; import 'package:farmy_mobile/services/database/db_models/anomalies_models/expert_solution.dart'; import 'package:farmy_mobile/services/database/db_models/farmer.dart'; import 'package:farmy_mobile/services/database/hive_type_ids.dart'; import 'package:hive/hive.dart'; import 'package:json_annotation/json_annotation.dart'; part 'anomaly_detail.g.dart'; @JsonSerializable() @HiveType(typeId: HiveTypeIDs.ANOMALY_DETAIL_TYPE_ID)...
```dart final user = { 'id': 48856307306397697, 'accountId': 1967, }; final dir = await getApplicationDocumentsDirectory(); final box = await Hive.openBox("test", path: dir.path); // ⚠️ readUser.id will be 48856307306397696 next launch...
In object box to create table and column it just need @Entity annotation nothing needed to add in variable for making it as column.
There is a dependency conflict when using hive_generator version ^2.0.1 alongside json_serializable version ^6.9.2 due to differing source_gen version requirements: Because hive_generator 2.0.1 depends on source_gen ^1.0.0 and json_serializable 6.9.2...
When I get the final output apk from the Flutter application, the program does not work properly But there is no problem on Android Studio emulator on Android Studio emulator...
**Description** When removing a nested object in hive that was filled with data before, the app does not start any longer. I found it in my production app first and...
can't read hive.openbox for flutter version 3.5.4