我正在使用aqueduct并且收到错误消息
'List<Serializable>' is not a subtype of type 'List<MyManagedObject>' of 'list' #0 _TypeError._throwNew (dart:core/runtime/liberrors_patch.dart:89:51)
但我不知道是什么?我运行我的代码没问题,只是我收到了这个我无法解决的错误,我用谷歌搜索了很多,但我找不到解决方案。这是我的“入口点”
@override
Controller get entryPoint {
final router = Router();
router
.route('${apiBaseUrl}/objects')
.link(() => ObjectController(context));
}
这是我的发布方法:
@Operation.post()
Future<Response> createMyObject(@Bind.body() List<MyManagedObject> list) async {
...
return Response.ok("ok");
}
我认为这可能是 lib 的错误,但我就是不知道。