Remote images
mbenci opened this issue · comments
Marco Bencivenni commented
Is it possible to use not only local images but also remote images?
Thanks
Ayman Abi Aoun commented
Came to post the same question
Ayman Abi Aoun commented
I was about to fork and add the feature to send whatever widget we want instead of the imagePath, when I noticed that it has already been done. The parameter you want is centerWidget. So your slide should look something like that:
new Slide(
title: "Title Goes Here",
description: "Description",
centerWidget: CachedNetworkImage(
imageUrl: "http://via.placeholder.com/350x150",
progressIndicatorBuilder: (context, url, downloadProgress) =>
CircularProgressIndicator(value: downloadProgress.progress),
errorWidget: (context, url, error) => Icon(Icons.error),
),
backgroundColor: Color(0xfff5a623),
)
Make sure not to send the pathImage parameter or it would show instead.
Duy Tran commented
Yeah, you guys can use centerWidget
like @lambasoft mention. Even we can use listCustomTabs
to custom entire your UI tab instead of just a center widget.