groupMemberRole2Dart static method

int groupMemberRole2Dart(
  1. int type
)

Implementation

static int groupMemberRole2Dart(int type) {
  int res = 0;
  switch (type) {
    case CGroupMemberRole.kTIMMemberRole_None:
      res = GroupMemberRoleType.V2TIM_GROUP_MEMBER_UNDEFINED;
      break;
    case CGroupMemberRole.kTIMMemberRole_Normal:
      res = GroupMemberRoleType.V2TIM_GROUP_MEMBER_ROLE_MEMBER;
      break;
    case CGroupMemberRole.kTIMMemberRole_Admin:
      res = GroupMemberRoleType.V2TIM_GROUP_MEMBER_ROLE_ADMIN;
      break;
    case CGroupMemberRole.kTIMMemberRole_Owner:
      res = GroupMemberRoleType.V2TIM_GROUP_MEMBER_ROLE_OWNER;
      break;
    default:
      res = GroupMemberRoleType.V2TIM_GROUP_MEMBER_UNDEFINED;
      break;
  }
  return res;
}