feat: configurable crossfade for RemoteImage

This commit is contained in:
Infi 2023-01-06 04:40:12 +01:00
parent 4a5365c3c1
commit c7e5795ca9
1 changed files with 2 additions and 1 deletions

View File

@ -22,12 +22,13 @@ fun RemoteImage(
contentScale: ContentScale = ContentScale.Crop,
width: Int = 0,
height: Int = 0,
crossfade: Boolean = true,
) {
val context = LocalContext.current
fun imageRequest() = run {
val builder = ImageRequest.Builder(context)
.crossfade(true)
.crossfade(crossfade)
.data(url)
if (width != 0 && height != 0) {