i want to make many different images but this just show up Exception has occurred. _TypeError (type 'Image' is not a subtype of type 'String')

Viewed 24

i want to make many different images using listView builder img

2 Answers

Image.asset takes a string not, in this case you can either have your widgets as

list a =[

'assets/myimage.png',
'assets/myimage.png']

or change the Image.asset in your listview to as your list a =[] returns a widget of type Image.asset

return a[index]

Related