fix: Adding a new hydrated cubit to an app that already has state causes errors from Hive. #3243
Labels
bug
Something isn't working
pkg:hydrated_bloc
This issue is related to the hydrated_bloc package
question
Further information is requested
Description
I've added a new
hydratedCubit
to an app (Android), that has already persisted data, and upon callingHydratedStorage.build
it errors. The cubit I added has a single required fieldString id
, and is built with freezed (AFAICT, shouldn't matter). When running the app inside a fresh web-browser profile (storage is clear) everything works fine.I'm unsure if this is a Hive issue, or an issue with HydratedBloc's use of Hive.
Steps To Reproduce
1.) Create an App with a hydratedCubit
2.) Launch app and have cubit save state
3.) Add a new
hydratedCubit
to the app4.) Calling
HydratedStorage.build
it errors from Hive.Expected Behavior
This should just work, or cause some error in my deserialization code.
Additional Context
When running the app inside a fresh web-browser profile (storage is clear) everything works fine. This also relates to #2613
w
The text was updated successfully, but these errors were encountered: