isar / isar/hive

Expected a value of type Map but got null (Flutter Web)

Open
#1,208 1 comment 2 reactions 0 assignees View on GitHub
problem
Dominant language
Dart
Stars
4.4k
Forks
449
PR merge metrics
No merged PRs in 30d

Description

**Steps to Reproduce**
Make a network call, get the response and store it.
The error occurs while reading the object, when the size of response is a little large.

The size of data which I am storing in my case is around 134KB.
I can see that the value is stored in a box in IndexedDB.

**Code sample**
```
Future storeData() async {
//making network call
final responseJson = await provider.getMovies();
await store.put('movies', responseJson);
}

await storeData();
value = store.get('movies');
//the value above gives error

```

**Version**
- Platform: Web
- Flutter version: 3.10.2
- Hive version: 2.2.3

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the store/get round trip on Flutter Web with a response around 134KB, using the code sample and checking the corresponding value in IndexedDB. Compare the stored value with the value returned by store.get('movies'); done means the value can be read successfully without the Map-versus-null error.

Written by the indexing model from the issue text.

Assessment

Tech stack
dart, flutter
Domain
database, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.