contactItem method

Widget contactItem(
  1. UserList users
)

Implementation

Widget contactItem(UserList users) {

  return InkWell(
    onTap: () {
      if (widget.forMakeGroup) {
        users.isSelected.value = !users.isSelected.value;
      } else {
        connectUser(otherUserId: users.userId);
      }
    },
    child: Row(
      children: [
        widget.forMakeGroup
            ? Obx(() => users.isSelected.value
            ?  Icon(Icons.check_box,color: widget.theme!.palette.mode == PaletteThemeModes.light?Colors.black:Colors.white,)
            :  Icon(Icons.check_box_outline_blank,color: widget.theme!.palette.mode == PaletteThemeModes.light?Colors.black:Colors.white,))
            : const SizedBox.shrink(),
        Padding(
          padding:
          EdgeInsets.only(left: widget.forMakeGroup ? 10 : 0, right: 10),
          child: Common.profileNetworkImage(
            borderRadius: 48.0,
            height: 48.0,
            width: 48.0,
            imageUrl: users.profilePicture,
          ),
        ),
        Text(
          "${users.username}",
          style: CustomTextStyles.medium(
              fontSize: 18.0, fontColor: widget.theme!.palette.getAccent800()),
        )
      ],
    ),
  );
}