We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
toJson()
jsonEncode(user)
使用对象时错误如下:
User user = new User("夏目友人帐",'1023007219@qq.com'); print(jsonEncode(user));
使用插件自动生产的 toJson()代码如下:
Map<String, dynamic> toJson(User instance) => _$UserToJson(instance);
应该改为:
Map<String, dynamic> toJson() => _$UserToJson(this);
The text was updated successfully, but these errors were encountered:
感谢提醒,这个估计是json_seriliazble升级导致的,现已经修复了,请升级到1.5版本。
Sorry, something went wrong.
No branches or pull requests
toJson()
方法写法错误,会造成jsonEncode(user)
这样的用法报错!使用对象时错误如下:
使用插件自动生产的
toJson()
代码如下:应该改为:
The text was updated successfully, but these errors were encountered: