flutter cliprect image code example

Example 1: Flutter give image rounded corners

ClipRRect(
    borderRadius: BorderRadius.circular(8.0),
    child: Image.network(
        subject['images']['large'],
        height: 150.0,
        width: 100.0,
    ),
)

Example 2: ink image clip flutter

Material(
              elevation: 0,
              clipBehavior: Clip.hardEdge,
              type: MaterialType.circle,
              color: Colors.grey[200],
              child: Stack(
                children: [
                  FadeInImage.assetNetwork(
                    placeholder: "resources/your_placeholder_image.png",
                    image:
                        'https://img.depor.com/files/ec_article_multimedia_gallery/uploads/2018/07/05/5b3e3ad01bd47.jpeg',
                    fit: BoxFit.cover,
                    width: 120.0,
                    height: 120.0,
                  ),
                  Positioned.fill(
                    child: Material(
                        color: Colors.transparent,
                        child: InkWell(
                            splashColor: Colors.lightGreenAccent, onTap: () {})),
                  ),
                ],
              ),
            ),

Tags:

Dart Example