File tree 3 files changed +12
-8
lines changed
3 files changed +12
-8
lines changed Original file line number Diff line number Diff line change
1
+ # 2.0.4
2
+
3
+ ### Enhancements
4
+
5
+ - Adds default value support to hive_generator generated class adapters
6
+
1
7
# 2.0.3
2
8
3
9
### Fixes
Original file line number Diff line number Diff line change @@ -5,12 +5,10 @@ class HiveField {
5
5
/// The index of this field.
6
6
final int index;
7
7
8
- /// Set `true` to use this enum value as default value instead of null in
9
- /// null-safety.
8
+ /// The default value of this field for class hive types.
10
9
///
11
- /// This property currently only used for enum types. In future might be used
12
- /// for other properties too. If the defaultValue is not provided the first
13
- /// enum will be used as default value.
10
+ /// In enum hive types set `true` to use this enum value as default value
11
+ /// instead of null in null-safety.
14
12
///
15
13
/// ```dart
16
14
/// @HiveType(typeId: 1)
@@ -22,7 +20,7 @@ class HiveField {
22
20
/// pear
23
21
/// }
24
22
/// ```
25
- final bool defaultValue;
23
+ final dynamic defaultValue;
26
24
27
- const HiveField (this .index, {this .defaultValue = false });
25
+ const HiveField (this .index, {this .defaultValue});
28
26
}
Original file line number Diff line number Diff line change 1
1
name : hive
2
2
description : Lightweight and blazing fast key-value database written in pure Dart. Strongly encrypted using AES-256.
3
- version : 2.0.3
3
+ version : 2.0.4
4
4
homepage : https://github.com/hivedb/hive/tree/master/hive
5
5
documentation : https://docs.hivedb.dev/
6
6
You can’t perform that action at this time.
0 commit comments