viewImage method

Widget viewImage(
  1. bool isHovered
)

Implementation

Widget viewImage(bool isHovered) {
  return Opacity(
    opacity: isHovered ? 0.5 : 1,
    child: Center(
      child: Container(
        width: size,
        height: size,
        decoration: BoxDecoration(
            shape: BoxShape.circle,
            border: Border.all(width: borderWith, color: Colors.blue)),
        child: Stack(
          children: [
            Container(
              alignment: Alignment.center,
              clipBehavior: Clip.antiAlias,
              decoration: const BoxDecoration(
                color: Colors.blue,
                shape: BoxShape.circle,
              ),
              child: image != null
                  ? Image(
                      width: size,
                      height: size,
                      image: image!,
                      fit: BoxFit.cover,
                    )
                  : url != null
                      ? ExtendedImage.network(
                          url!,
                          width: size ?? double.infinity,
                          height: size ?? double.infinity,
                          shape: BoxShape.circle,
                          fit: BoxFit.cover,
                          //cancelToken: cancellationToken,
                        )
                      : child ??
                          (defaultImage != null
                              ? Image(
                                  width: size,
                                  height: size,
                                  image: defaultImage!,
                                  fit: BoxFit.cover,
                                )
                              : null),
            ),
          ],
        ),
      ),
    ),
  );
}