Open devopsean opened 10 months ago
+1, My app seems to persist with 9.1.2 but not with 9.1.3
Sorry for the delay! I'll investigate and try to get a fix in by the end of the week, thanks!
@JoseGeorges8 @devopsean I tried to reproduce and was unable. Are either of you able to provide a link to a minimal reproduction sample with detailed steps to reproduce the error (e.g. what platform you're running on what host machine you're using, what version of flutter/dart etc)? Thanks!
@felangel Steps to reproduce the error:-
Platform: Web, Android and iOS.
Mac OS: 14.2.1 (23C71)
VS code: 1.85.2 (Universal)
Flutter and Dart version: Flutter 3.10.5 • channel stable Dart 3.0.5 • DevTools 2.23.1
@JoseGeorges8 @devopsean I tried to reproduce and was unable. Are either of you able to provide a link to a minimal reproduction sample with detailed steps to reproduce the error (e.g. what platform you're running on what host machine you're using, what version of flutter/dart etc)? Thanks!
Flutter 3.16.0 • channel stable • https://github.com/flutter/flutter.git Framework • revision db7ef5bf9f (10 weeks ago) • 2023-11-15 11:25:44 -0800 Engine • revision 74d16627b9 Tools • Dart 3.2.0 • DevTools 2.28.2
Mac OS: 13.5.1 (22G90)
Android Studio Giraffe | 2022.3.1 Patch 2
Thanks, I'll try to reproduce with the Flutter/Dart versions you both provided and get back to you.
@felangel Any update on this?
@Akshay-Niveus i'd really appreciate any reproduction steps as so far I've been unable to reproduce the issue, thanks!
@felangel I was able to reproduce it. It affects HydratedMixin
.
It's not exactly a "bug", but rather a breaking change introduced with https://github.com/felangel/bloc/commit/e2407caf46dd217535816889ea0e6791fdc4ab3c .
Before this commit landed, even though the documentation said to call
hydrate();
in the constructor, the desired behavior would work without calling it (fromJson
was called anyway from the state
getter);
After the commit landed, fromJson
is not called anymore if the user doesn't explicitly call it.
Not sure if a fix is required here? But since it is a breaking change, maybe it would be worth:
9.1.6
version that calls fromJson
if the state is null?9.2.0
by saying something along the lines of "previously, HydratedMixin would work without calling hydrate()
, but it is now required"am facing the same issue after updating my flutter to Flutter 3.24.3 • channel stable • https://github.com/flutter/flutter.git Framework • revision 2663184aa7 (5 weeks ago) • 2024-09-11 16:27:48 -0500 Engine • revision 36335019a8 Tools • Dart 3.5.3 • DevTools 2.37.3
with flutter_bloc: ^8.1.6 hydrated_bloc: ^9.1.5
Description Hydrated bloc stopped persisting and restoring states after I updated beyond v9.1.0. When I lock in v9.1.0 in my pubspec.yaml, it works fine but when I let it run to the max possible version using "^", it does not work.
Steps To Reproduce
Expected Behavior State should correctly persist.
Additional Context I get null data from persistence using hydrated_bloc: ^9.1.0