I have an app show data from firebase ,and image in folder called category in firebase storage ,the name of image is same id field of collections.
now I want to view data and view image of same field :
child: ListView.builder(
padding: EdgeInsets.all(10),
itemCount: doctorData.length,
itemBuilder: (context, index) {
return Card(
elevation: 15,
child: ListTile(
leading: Container(
width: 60,
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(30)),
child: Image(
image: NetworkImage(
'gs://myproject.appspot.com/categories/categories/${doctorData[index]['id']}.png'),
)
),
onTap: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => Detail(doctorData[index]),
),
);
},
title: Text('Dr. ${doctorData[index]['name_en']}',
style: TextStyle(fontSize: 22)),
subtitle: Text('?. ${doctorData[index]['name_ar']}',
style: TextStyle(fontSize: 22)),
),
);
}),
),
The image isn't shown , How can I view the image
question from:
https://stackoverflow.com/questions/65861496/flutter-firebase-how-to-view-images-depend-on-id 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…