Closed mithunadhikari40 closed 2 years ago
Yeah, that's because the js doesn't have named arguments feature. And since dart code is transpiled to js there is no way to do it gracefully. So if you are targeting web platform you shouldn't use named arguments to keep your dart code multiplatform safe.
Here is the place where it's handled.
I have been using this package for quite a while and it works all great. However, I stumbled upon an issue running on the web and it is very specific. I am not able to create a model class instance from JSON when that model class has a named argument, however, it works when we have a positional argument in the model class's constructor. This is a minimal piece of code to reproduce the issue on the web.