#ASK Anyone is using Supabase with flutter in her...
# off-topic
b
#ASK Anyone is using Supabase with flutter in here???? I got a problem. Why i can only fetching one image and the others was getting an error because it was getting an extra String in the behind like this :
Copy code
"HTTP request failed, statusCode: 400, https://ojiuxsweoqbgmknpdrnw.supabase.co/storage/v1/object/public/bookimage/fxnTgRmbvA.png%0D%0A"
As u can see i got
Copy code
%0D%0A
extra string in the behind. IDK why this was happened. When i fetching with browser without this extra string, it was working. My code : Fetching image :
Copy code
dart
  String? getImageUrl(String data) {
    var res = this._supabase.storage.from('bookimage').getPublicUrl(data);
    print(res.data);
    return res.data;
  }
Widget Image :
Copy code
dart
CircleAvatar(
    radius: 50,
    child: Image.network(this.controller.getImageUrl(this.controller.bookList[index]['image']) ?? ''),
)
s
Please move all follow up to this thread
b
I solve this by parse the URL like this :
Copy code
dart
Uri getImageUrl(String data) {
    final res = this._supabase.storage.from('bookimage').getPublicUrl(data);
    final parsed = Uri.parse(res.data.toString().trim());
    return parsed;
  }