Home > OS >  I can't reach model fields on list
I can't reach model fields on list

Time:11-26

I did list data from API. I want use list method on list with dropdownmenu but I can't reach field on list. I want to list my data as price increasing or decreasing. How to I solve to this problem? My list type is RxList.
my list: RxList productList= [].obs;

enter image description here enter image description here

CodePudding user response:

Just set type to your RxList when declaring it:

  RxList<YOUR_TYPE> productList = [].obs;

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