Salih Balsever
Salih Balsever

Reputation: 199

I can't reach model fields on list

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

Upvotes: 1

Views: 65

Answers (1)

Mojtaba Ghiasi
Mojtaba Ghiasi

Reputation: 983

Just set type to your RxList when declaring it:

  RxList<YOUR_TYPE> productList = [].obs;

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

Upvotes: 1

Related Questions