I am trying to load images from a folder in firebase storage and the code is giving me this error {type 'Future' is not a subtype of type 'String'} , I don't even know if this code achieves my purpose
class FireStorageService extends ChangeNotifier{
FireStorageService();
final storage = FirebaseStorage.instance;
static Future<dynamic> loadImage(String image) async{
return await storage.ref('folder5/$image').getDownloadURL();
}
}
Future<Widget> getImage() async {
final url = await FireStorageService.loadImage('1.jpg');
return Image.network(url);
}