formatedFriendListRes static method

List<Map<String, dynamic>> formatedFriendListRes(
  1. dynamic friendList
)

Implementation

static List<Map<String, dynamic>> formatedFriendListRes(friendList) {
  final List<Map<String, dynamic>> formatedList = List.empty(growable: true);
  friendList.forEach((listItem) {
    final item = jsToMap(listItem);
    final profile = jsToMap(item['profile']);
    final formatedItem = <String, dynamic>{
      'userID': item['userID'],
      'friendGroups': item['groupList'],
      'friendRemark': item['remark'],
      'userProfile': V2TimProfile.userFullInfoExtract(profile),
    };
    formatedList.add(formatedItem);
  });

  return formatedList;
}