type 'List<dynamic>' is not a subtype of type 'List<LocalltemSize>' in type cast #3240
-
facing error while reading
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
this is the main error causing line |
Beta Was this translation helpful? Give feedback.
-
As mentioned here (arguably not visible enough, I'll improve the docs here), type converters don't apply to the This can easily be fixed by using the |
Beta Was this translation helpful? Give feedback.
As mentioned here (arguably not visible enough, I'll improve the docs here), type converters don't apply to the
fromJson
factory by default.This can easily be fixed by using the
JsonTypeConverter
class, which is almost identical but signals to drift that the converter should also be applied when serializing to JSON instead of just for the db <-> Dart translation.