The analyzer shows an error without types. "implicit_dynamic_parameter"
Do you have any plans to fix it?
For example instead of this
models: (json['models'] as List)
?.map((e) =>
just use this
models: (json['models'] as List<Object>)
?.map((e) =>
See #705
?
So sorry! I meant
See https://github.com/google/json_serializable.dart/issues/557
And also https://github.com/dart-lang/language/issues/993
Thank you, I read it.
But to fix the problem, not add "exclude". You might just close the generic type with an object!
json['models'] as List<Object> instead of json['models'] as List and that's all!
And in the future when nullable types will be added, just replace with json['models'] as List<Object?>?
@kevmoo What do you think about it?
I'm not going to do anything extra here until https://github.com/dart-lang/language/issues/993#issuecomment-635618384 is resolved.
It'd just create too much churn.
I understood.
Most helpful comment
Thank you, I read it.
But to fix the problem, not add "exclude". You might just close the generic type with an object!
json['models'] as List<Object>instead ofjson['models'] as Listand that's all!And in the future when nullable types will be added, just replace with
json['models'] as List<Object?>?