我无法访问列表中的模型字段

I can't reach model fields on list

我列出了来自 API 的数据。我想在带有下拉菜单的列表中使用列表方法,但我无法访问列表中的字段。我想将我的数据列为价格上涨或下跌。我该如何解决这个问题? 我的列表类型是 RxList.
我的清单:RxList productList= [].obs;

只需在声明 RxList 时将类型设置为:

  RxList<YOUR_TYPE> productList = [].obs;

  productController.productList.sort((a,b)=> //do your sort);