title: is there a way to make this code work without removing the Positioned.fill widget
body: <p>I am trying to build a listview of clickable images that scrolls horizontally so i put the listview within a container and every child of the list view is a container that has a stack containing the image and and an inkwell widget, this code is throwing an error when building the stack, i tried to play with the code adding height or width to the containers, also tried removing cliprrect widget but it only works fine when i remove the positioned.fill widget around the image.</p>
  <pre><code>    return Scaffold(
        body: Container(
          height: 150,
          child: ListView(
            scrollDirection: Axis.horizontal,
            children: [
              // image container
              Container(
                margin: EdgeInsets.all(2),
                child: Stack(
                  children: [
                    Positioned.fill(
                      child: ClipRRect(
                        borderRadius: BorderRadius.circular(5),
                        child: CachedNetworkImage(
                          placeholder: (context, url) =&gt;
                              Image.asset('assets/images/def3.png'),
                          errorWidget: (context, posterUrl, error) =&gt;
                              Image.asset('assets/images/def3.png'),
                          imageUrl: 'imageurl',
                          fit: BoxFit.cover,
                        ),
                      ),
                    ),
                    Positioned.fill(
                      child: Material(
                        color: Colors.transparent,
                        child: InkWell(
                          borderRadius: BorderRadius.circular(5),
                          onTap: () {},
                        ),
                      ),
                    )
                  ],
                ),
              ),
            ],
          ),
        ),
      );
    }
  </code></pre>
  <p><a href="https://i.stack.imgur.com/HANiO.png" rel="nofollow noreferrer">Failed assertion: line 588 pos 12: 'size.isFinite': is not true.</a></p>
  <p><a href="https://i.stack.imgur.com/e7Wbo.png" rel="nofollow noreferrer">When the exception is thrown this was the stack</a></p>