hive
hive copied to clipboard
Requesting typeAdpter for DateTime type
Future
return true;
}
When I'm trying to save my Session object to the box, I get the following error:
Error: HiveError: Cannot write, unknown type: DateTime. Did you forget to register an adapter?
This error I'm facing in previous versions too!
- Platform: Web
- Flutter version: [2.10.5]
- Hive version: [2.1.0]
I have a doubt that you called to Hive.initFlutter instead of using Hive.init directly? The problem is that DateTime adapter is one of the internal adapters that would be registered when calling the Hive.init method. While using Hive.initFlutter would return immediately without calling to the lower layer init method for web.
Same issue with me. Working fine in Android but not in Web. This is happening after upgrading to hive 2.2.1 from 2.0.6
Waiting for this to be released, as this is breaking our app on web.