fix: Enum
with int
type cannot be stored
#3983
Labels
bug
Something isn't working
dependency
This issue has an external dependency
needs triage
This issue requires triage
pkg:hydrated_bloc
This issue is related to the hydrated_bloc package
Description
When I used
@JsonValue
to specifyint
value to an enum entry, the value cannot be stored and the retrieved value will always be empty.Steps To Reproduce
@JsonValue
of typeint
State
with typeMap<Step, String>
State
Expected Behavior
The state should be
Actual Behavior
The state showed
registerSteps: {},
Additional Context
The problem is in the method
dynamic _traverseComplexJson(dynamic object)
,The map's key is type
int
so it cannot be casted toString
so the value will not be storedThe text was updated successfully, but these errors were encountered: