0

i use ThreeLineAvatarListItem in kivymd and i'm wondering how you can use an image from an url,

when i use a local image it's working but when it's an url, i receive this message:

[ERROR ] [Image ] Not found https://c1.scryfall.com/file/scryfall-cards/art_crop/front/0/1/01cb2a12-4c1c-413d-91b1-574e4a00e251.jpg?1581630415

the code i use is this one :

for row in result:
    image = ImageLeftWidget(source=row[3])
    items = ThreeLineAvatarListItem(text=row[0], secondary_text=row[1],tertiary_text=row[2])
    items.add_widget(image)
    lv.add_widget(items)

row[3] contains "https://c1.scryfall.com/file/scryfall-cards/art_crop/front/0/1/01cb2a12-4c1c-413d-91b1-574e4a00e251.jpg?1581630415"

is there a way to do that ?

thank you

1 Answer 1

0

Try defining your own version of ImageLeftWidget that uses AsyncImage instead of Image, like this:

class AsyncImageLeftWidget(ILeftBody, AsyncImage):
    pass

Then use this class in your code in place of ImageLeftWidget.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.