You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I get an error after the response: DioError [unknown]: null I/flutter (19668): │ Error: Deserializing '[{id: 2, name: Test, email: [email protected]...' to 'BuiltList<OverviewPlace>' failed due to: Deserializing '[id, 2, name, Test, email, [email protected]...' to 'OverviewPlace' failed due to: Deserializing '[slots, [[], [{time_from: 07:00:00, time_to: 14:00:00}, {time_from: 15:00:00,...' to 'Schedule?' failed due to: Deserializing '[[], [{time_from: 07:00:00, time_to: 14:00:00}, {time_from: 15:00:00, time_to...' to 'BuiltList<BuiltList<TimeSlot>>' failed due to: Deserializing '[]' to 'BuiltList<TimeSlot>' failed due to: Bad state: No builder factory for BuiltList<TimeSlot>. Fix by adding one, see SerializersBuilder.addBuilderFactory.
It was solved by adding the code to the serializers.dart file: ..addBuilderFactory( const FullType(BuiltList, [FullType(TimeSlot)]), () => ListBuilder<TimeSlot>(), )
The text was updated successfully, but these errors were encountered:
When receiving JSON:
[ { "id": 1, "name": "Test", "schedule": { "slots": [ [], [], [], [], [], [], [ { "time_from": "10:30:00", "time_to": "15:45:00" } ] ] } } ]
I get an error after the response:
DioError [unknown]: null I/flutter (19668): │ Error: Deserializing '[{id: 2, name: Test, email: [email protected]...' to 'BuiltList<OverviewPlace>' failed due to: Deserializing '[id, 2, name, Test, email, [email protected]...' to 'OverviewPlace' failed due to: Deserializing '[slots, [[], [{time_from: 07:00:00, time_to: 14:00:00}, {time_from: 15:00:00,...' to 'Schedule?' failed due to: Deserializing '[[], [{time_from: 07:00:00, time_to: 14:00:00}, {time_from: 15:00:00, time_to...' to 'BuiltList<BuiltList<TimeSlot>>' failed due to: Deserializing '[]' to 'BuiltList<TimeSlot>' failed due to: Bad state: No builder factory for BuiltList<TimeSlot>. Fix by adding one, see SerializersBuilder.addBuilderFactory.
It was solved by adding the code to the
serializers.dart
file:..addBuilderFactory( const FullType(BuiltList, [FullType(TimeSlot)]), () => ListBuilder<TimeSlot>(), )
The text was updated successfully, but these errors were encountered: