GestureDetector always returning same location for any image tapped.

```
while (i<numImages) {
    GestureDetector(
    onTap:(){
      _onImageTapped(i);
    },

   child: FadeInImage(
      fit: BoxFit.cover,
      image: AssetImage(urls[i%5]),
       placeholder: AssetImage(urls[i%5]),

  )));
images.add(carImage);
i++;
 }
}

```

On card tapped function is as:

```
_onImageTapped(int position) {
        print('$position tapped');
   }

```