Requesting typeAdpter for DateTime type
Open
problem
- Dominant language
- Dart
- Stars
- 4.4k
- Forks
- 449
- PR merge metrics
- No merged PRs in 30d
Description
Future saveSessionCache(Session? session) async {
session!.id = sessionCacheId;
var box = await hive.openBox(sessionCacheBox);
await box.clear();
await box.put(session.id, session);
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]
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.