Skip to content

Upgrading hive_flutter 0.3 to 1

Breaking0.3.1 → 1.1.0Breaking3New3Changed2Fixed3Other3

BreakingUpgrade verdict

3 breaking changes.

  • You can no longer attach type adapters to one box only; adapters are registered globally.
  • Passing an index that does not exist to these methods now fails instead of being tolerated.
  • Code that expected a list back from addAll() now gets a more general iterable instead.
3 items need code or config changes

Dart SDK requirement changed in 1.0.0: >=2.6.0 <3.0.0 → >=2.12.0 <3.0.0.

Breaking3
Removes the option to register TypeAdapters for a specific box, such as box.registerTypeAdapter().
TypeAdaptersregisterTypeAdapter()
getAt(), putAt(), deleteAt() and keyAt() no longer allow indices out of range.
getAt()putAt()deleteAt()keyAt()
Changes the return type of addAll() from List<int> to Iterable<int>.
addAll()