hive
hive copied to clipboard
Specifying default value when reading a key that doesn't exist is returning null
Steps to Reproduce
- Open a Hive box
- Specify a default value of false and read a key that does not exist.
- Notice null is returned instead of false.
Code sample
await Hive.openBox('hiveBoxName');
return Hive.box('hiveBoxName').get('keyThatDoesNotExist', defaultValue: false);
Version
- Platform: iOS, Android
- Flutter version: 3.0.4
- Hive version: 2.1.0