nosuchmethoderror:class' _bigintimpl'没有实例方法' tojson'
我试图将bigint转换为Dart Dart SDK版本:2.17.3(稳定)(稳定)(6月1日1:06:06:41 2022 +0200)在“ macos_arm64”
上,代码看起来像以下:
static Future<bool> updateTodoProperties(Todo todo) async {
Map<String,Object> params = new HashMap();
params.putIfAbsent("id", () => todo.id);
params.putIfAbsent("name", () => todo.name);
var response = await RestClient.patch("/tik/todo/v1/update",params);
if (RestClient.respSuccess(response)) {
return true;
}else{
return false;
}
}
碰到此功能时,显示错误:
NoSuchMethodError: Class '_BigIntImpl' has no instance method 'toJson'.
Receiver: Instance of '_BigIntImpl'
Tried calling: toJson
这是todo
参数看起来像:
我该怎么办来解决这个问题?
I am tried to convert the BigInt to json in dart Dart SDK version: 2.17.3 (stable) (Wed Jun 1 11:06:41 2022 +0200) on "macos_arm64"
, the code look like this:
static Future<bool> updateTodoProperties(Todo todo) async {
Map<String,Object> params = new HashMap();
params.putIfAbsent("id", () => todo.id);
params.putIfAbsent("name", () => todo.name);
var response = await RestClient.patch("/tik/todo/v1/update",params);
if (RestClient.respSuccess(response)) {
return true;
}else{
return false;
}
}
when run into this function, show error:
NoSuchMethodError: Class '_BigIntImpl' has no instance method 'toJson'.
Receiver: Instance of '_BigIntImpl'
Tried calling: toJson
this is the todo
parameter look like:
what should I do to fixed this problem?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论