Untitled

mail@pastecode.io avatar
unknown
dart
2 years ago
976 B
2
Indexable
Center(
      child: Material(
        borderRadius: BorderRadius.circular(defaultRadius),
        clipBehavior: Clip.hardEdge,
        child: Ink(
          child: InkWell(
            onTap: () {},
            child: Container(
              height: 200,
              width: 200,
              child: CachedNetworkImage(
                imageUrl: "https://www.happierhuman.com/wp-content/uploads/2022/07/glass-half-full-type-persons-lessons-learned.jpg",
                fit: BoxFit.cover,
                imageBuilder: (context, imageProvider) {
                  return Ink.image(
                    image: imageProvider,
                    fit: BoxFit.cover,
                  ).cornerRadiusWithClipRRect(16);
                },
                placeholder: (_, s) {
                  return placeHolderWidget(height: 200, width: 200, fit: BoxFit.cover, radius: defaultRadius);
                },
              ),
            ),
          ),
        ),
      ),
    );