flutterbond / flutterbond/flutter-bond

Cache.getAll<List<T>> requires ResponseDecoding for T even for local cache, throws error

Open
#137 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Dart
Stars
176
Forks
49
PR merge metrics
No merged PRs in 30d

Description

**Reading a cached List

with Cache.getAll
() throws “No ResponseDecoding provider found for type Address”, even though the data was written locally (no network involved).**

**Steps to reproduce:**

1. Write a list of models to cache: await Cache.put('cached_addresses',

[...]);
2. Read it: final list = Cache.getAll
('cached_addresses', defaultValue:
[]);
3. Observe exception.

**Actual error:**
Invalid argument(s): No ResponseDecoding provider found for type Address.

**snippet**:
`
await Cache.put('cached_addresses',

[Address(id: 1, address: 'X')]);
final items = Cache.getAll
('cached_addresses', defaultValue:
[]);
`

Image

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.