buildProfileImage function

Widget buildProfileImage(
  1. ProfileDetails item, {
  2. double size = 105,
})

Implementation

Widget buildProfileImage(ProfileDetails item, {double size = 105}) {
  return ImageNetwork(
    url: item.image.toString(),
    width: size,
    height: size,
    clipOval: true,
    errorWidget: item.isGroupProfile.checkNull()
        ? ClipOval(
            child: Image.asset(
              groupImg,
              height: 48,
              width: 48,
              fit: BoxFit.cover,
            ),
          )
        : ProfileTextImage(
            text: item.getName(),
            radius: size / 2,
          ),
    isGroup: item.isGroupProfile.checkNull(),
    blocked: item.isBlockedMe.checkNull() || item.isAdminBlocked.checkNull(),
    unknown: (!item.isItSavedContact.checkNull() || item.isDeletedContact()),
  );
}