groupAttributesUpdated static method

void groupAttributesUpdated(
  1. ZIMEngine zim,
  2. dynamic data
)

Implementation

static void groupAttributesUpdated(ZIMEngine zim, dynamic data) {
  if (ZIMEventHandler.onGroupAttributesUpdated == null) return;

  List<ZIMGroupAttributesUpdateInfo> list = [];
  List<dynamic> infoList = data['infoList'];

  infoList.forEach((info) {
    Map<String, String> mapGroupAttributes =
        Map.from(info['groupAttributes']);
    ZIMGroupAttributesUpdateInfo atr = ZIMGroupAttributesUpdateInfo();
    atr.action = ZIMGroupAttributesUpdateAction.values[info['action']];
    atr.groupAttributes = mapGroupAttributes;
    list.add(atr);
  });

  final groupID = data['groupID'];

  ZIMEventHandler.onGroupAttributesUpdated!(zim, list,
      ZIMConverter.oZIMGroupOperatedInfo(data['operatedInfo']), groupID);
}