Package com.skydoves.landscapist.coil

Types

CoilImageState
Link copied to clipboard
sealed class CoilImageState
CoilImageState is a state of the coil image requesting.

Functions

CoilImage
Link copied to clipboard
@Composable()
fun CoilImage(imageRequest: ImageRequest, modifier: Modifier = Modifier, imageLoader: ImageLoader = LocalCoilProvider.getCoilImageLoader(), alignment: Alignment = Alignment.Center, contentScale: ContentScale = ContentScale.Crop, contentDescription: String? = null, alpha: Float = DefaultAlpha, colorFilter: ColorFilter? = null, circularRevealedEnabled: Boolean = false, circularRevealedDuration: Int = DefaultCircularRevealedDuration, shimmerParams: ShimmerParams, bitmapPalette: BitmapPalette? = null, success: @Composable() (imageState: CoilImageState.Success) -> Unit? = null, failure: @Composable() (imageState: CoilImageState.Failure) -> Unit? = null)
Requests loading an image and create some composables based on CoilImageState.
@Composable()
fun CoilImage(imageRequest: ImageRequest, modifier: Modifier = Modifier, imageLoader: ImageLoader = LocalCoilProvider.getCoilImageLoader(), alignment: Alignment = Alignment.Center, contentScale: ContentScale = ContentScale.Crop, contentDescription: String? = null, alpha: Float = DefaultAlpha, colorFilter: ColorFilter? = null, circularRevealedEnabled: Boolean = false, circularRevealedDuration: Int = DefaultCircularRevealedDuration, bitmapPalette: BitmapPalette? = null, loading: @Composable() (imageState: CoilImageState.Loading) -> Unit? = null, success: @Composable() (imageState: CoilImageState.Success) -> Unit? = null, failure: @Composable() (imageState: CoilImageState.Failure) -> Unit? = null)
Requests loading an image and create some composables based on CoilImageState.
@Composable()
fun CoilImage(imageModel: Any, modifier: Modifier = Modifier, context: Context = LocalContext.current, lifecycleOwner: LifecycleOwner = LocalLifecycleOwner.current, imageLoader: ImageLoader = LocalCoilProvider.getCoilImageLoader(), alignment: Alignment = Alignment.Center, alpha: Float = DefaultAlpha, contentScale: ContentScale = ContentScale.Crop, contentDescription: String? = null, circularRevealedEnabled: Boolean = false, circularRevealedDuration: Int = DefaultCircularRevealedDuration, colorFilter: ColorFilter? = null, shimmerParams: ShimmerParams, bitmapPalette: BitmapPalette? = null, error: Any? = null)
Requests loading an image with a loading placeholder and error image resource (ImageBitmap, ImageVector, Painter).
@Composable()
fun CoilImage(imageModel: Any, modifier: Modifier = Modifier, context: Context = LocalContext.current, lifecycleOwner: LifecycleOwner = LocalLifecycleOwner.current, imageLoader: ImageLoader = LocalCoilProvider.getCoilImageLoader(), alignment: Alignment = Alignment.Center, alpha: Float = DefaultAlpha, contentScale: ContentScale = ContentScale.Crop, contentDescription: String? = null, circularRevealedEnabled: Boolean = false, circularRevealedDuration: Int = DefaultCircularRevealedDuration, bitmapPalette: BitmapPalette? = null, colorFilter: ColorFilter? = null, placeHolder: Any? = null, error: Any? = null)
Requests loading an image with a loading placeholder and error image resource (ImageBitmap, ImageVector, Painter).
@Composable()
fun CoilImage(imageModel: Any, modifier: Modifier = Modifier, context: Context = LocalContext.current, lifecycleOwner: LifecycleOwner = LocalLifecycleOwner.current, imageLoader: ImageLoader = LocalCoilProvider.getCoilImageLoader(), alignment: Alignment = Alignment.Center, contentScale: ContentScale = ContentScale.Crop, contentDescription: String? = null, alpha: Float = DefaultAlpha, colorFilter: ColorFilter? = null, circularRevealedEnabled: Boolean = false, circularRevealedDuration: Int = DefaultCircularRevealedDuration, shimmerParams: ShimmerParams, bitmapPalette: BitmapPalette? = null, success: @Composable() (imageState: CoilImageState.Success) -> Unit? = null, failure: @Composable() (imageState: CoilImageState.Failure) -> Unit? = null)
Requests loading an image and create some composables based on CoilImageState.
@Composable()
fun CoilImage(imageModel: Any, modifier: Modifier = Modifier, context: Context = LocalContext.current, lifecycleOwner: LifecycleOwner = LocalLifecycleOwner.current, imageLoader: ImageLoader = LocalCoilProvider.getCoilImageLoader(), alignment: Alignment = Alignment.Center, contentScale: ContentScale = ContentScale.Crop, contentDescription: String? = null, alpha: Float = DefaultAlpha, colorFilter: ColorFilter? = null, circularRevealedEnabled: Boolean = false, circularRevealedDuration: Int = DefaultCircularRevealedDuration, bitmapPalette: BitmapPalette? = null, loading: @Composable() (imageState: CoilImageState.Loading) -> Unit? = null, success: @Composable() (imageState: CoilImageState.Success) -> Unit? = null, failure: @Composable() (imageState: CoilImageState.Failure) -> Unit? = null)
Requests loading an image and create some composables based on CoilImageState.
toCoilImageState
Link copied to clipboard
fun ImageLoadState.toCoilImageState(): CoilImageState
casts an ImageLoadState type to a CoilImageState.

Properties

LocalCoilImageLoader
Link copied to clipboard
val LocalCoilImageLoader: ProvidableCompositionLocal<ImageLoader?>
Local containing the preferred ImageLoader for providing the same instance in our composable hierarchy.