addBuilderFactory abstract method
Adds a builder factory.
Builder factories are needed when deserializing to types that use
generics. For example, to deserialize a BuiltList<Foo>
, built_value
needs a builder factory for BuiltList<Foo>
.
built_value
tries to generate code that will install all the builder
factories you need, but this support is incomplete. So you may need to
add your own. For example:
serializers = (serializers.toBuilder()
..addBuilderFactory(
const FullType(BuiltList, [FullType(Foo)]),
() => ListBuilder<Foo>(),
))
.build();
Implementation
void addBuilderFactory(FullType specifiedType, Function function);