Skip to content

v1.2.0

Choose a tag to compare

@simc simc released this 22 Dec 14:16

Use latest version of hive_generator

Breaking changes

  • Removed the Hive.path getter
  • Removed Hive.openBoxFromBytes() (use the bytes parameter of Hive.openBox() instead)
  • LazyBox and Box now have a common parent class: BoxBase
  • Lazy boxes need to be opened using Hive.openLazyBox()
  • Open lazy boxes can be aquired using Hive.lazyBox()
  • Box name bug resolved (more information below)

Enhancements

  • Support for relationships, HiveLists (see docs for details)
  • Support for inheritance
  • Lazy boxes can now have a type argument LazyBox<YourModel>
  • Added method to delete boxes without opening them Hive.deleteBoxFromDisk()
  • Added path parameter to open boxes in a custom path
  • Improved documentation

Fixes

  • HiveObjects have not been initialized correctly in lazy boxes
  • Fixed bug where uppercase box name resulted in an uppercase filename
  • Fixed compaction bug which caused corrupted boxes
  • Fixed bug which did not allow the key 0xFFFFFFFF
  • Fixed bug where not all BoxEvents have been broadcasted

More

  • Changed type of encryptionKey from Uint8List to List<int>

Important:

Due to a bug in previous Hive versions, boxes whose name contains uppercase characters were stored in a file that also contains upper case characters (e.g. 'myBox' -> 'myBox.hive').

To avoid different behavior on case sensitive file systems, Hive should store files with lower case names. This bug has been resolved in version 1.2.0.

If your box name contains upper case characters, the new version will not find a box stored by an older version. Please rename the hive file manually in that case.
This also applies to the web version.