Closed Vpdwivedi closed 1 year ago
Not familiar with HiveBox, but I believe that you can try to store as string into HiveBox and then deserialize it as Map<String, Object?>
s.SurveyWidget(
survey: survey!,
onChange: (v) {
final String s = json.encode(v);
// put s into hivebox
}
after your application restart
FutureBuilder(
future: //get s from hivebox
builder :(){
s.SurveyWidget(
survey: survey!,
answer: json.decode(snapshot.data)
}
)
This worked for me. You are awesome!. Thanks you so much.
Describe the bug Getting the error '_Map<dynamic, dynamic>' is not a subtype of type 'Map<String, Object?>?' however I am storing the survey response data to HiveBox and then sending the same response data to answer. If I add a survey and edit the same response works fine but Error coms when I restart the application and then going to the edit survey screen.
To Reproduce SurveyJs json
SurveyJs answer
Expected behavior
Screenshots
Desktop (please complete the following information):
Smartphone (please complete the following information):
Additional context