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;
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);