rechargeInList method

Future rechargeInList(
  1. String type,
  2. RechargeTypeList codeType, {
  3. bool pop = false,
})

Implementation

Future rechargeInList(String type, RechargeTypeList codeType,
    {bool pop = false}) {
  return RechargeDao.rechargeList(type, codeType.type).then((res) {
    if (res.result) {
      List<RechargeList> list = res.data.list;
      list.sort((a, b) =>
          compareString(a.sortTop).compareTo(compareString(b.sortTop)));
      rechargeModels[codeType] = list;
      return true;
    }
    return false;
  });
}