google / google/built_collection.dart
Shouldn't BuiltMap<String, BuiltSet<int>> work out of the box?
- Dominant language
- Dart
- Stars
- 285
- Forks
- 54
- Avg merge
- 23m
- Merged PRs (30d)
- 1
Description
So this throws a DeserializationError.
```
@nullable
BuiltMap> get entries;
```
Using this raw data: `[wv8P7YM21ryHwcvtCoGR, [688, 689, 690, 691, 692, 693, 694, 695, 696, 697]]`
Thought it was supported.
Also tried making a custom builder factory for it, like the error message suggests - same error.
Any hints?
EDIT:
This is auto-generated in serializers.g.dart:
```
..addBuilderFactory(
const FullType(BuiltMap, const [
const FullType(String),
const FullType(BuiltSet, const [const FullType(int)])
]),
() => new MapBuilder>())
```
Looks correct? Doesn't work
The exception message:
```
══╡ EXCEPTION CAUGHT BY FLUTTER FRAMEWORK ╞═════════════════════════════════════════════════════════
I/flutter (17084): The following DeserializationError was thrown:
I/flutter (17084): 'Turnover' failed due to: Deserializing '[wv8P7YM21ryHwcvtCoGR, [688, 689, 690, 691, 692, 693, 694,
I/flutter (17084): 695, 696, 697]]' to 'BuiltMap>' failed due to: Deserializing '[688, 689, 690,
I/flutter (17084): 691, 692, 693, 694, 695, 696, 697]' to 'BuiltSet' failed due to: Bad state: No builder factory
I/flutter (17084): for BuiltSet. Fix by adding one, see SerializersBuilder.addBuilderFactory.
```
Contributor guide
Assessment
This issue has not been assessed yet.